Conditional Region (ASP/VB)

I am displaying the following item from my database in the
page:
<%=
DoDateTime((EmploymentHist.Fields.Item("EmpStart").Value), 2, 9225)
%>
This works fine if the data entered is a full date
(mm/dd/yyyy), but
sometimes the user enters just the year, if they do the
formatting of the
data doesnt work and the data displayed is incorrect, in the
scenario that
the data entered is not a valid full date (month, day, year),
then I want to
display:
<%=(EmploymentHist.Fields.Item("EmpStart").Value)%>
So its basically a condition, how can I check that the data
entered is a
full date and display first item, otherwise second item.
I am using ASP/VB
Aleks

Use the VBScript IsDate() function.

Similar Messages

  • Numbering of headlines with conditional regions

    Hi
    Its my first post, so i want to apologize if some informations are missing.
    I want to number headlines in MS WORD 2007 for a BI Publisher 11.1.5 report, which has some conditional regions included.
    My problem is that invisible regoins also increment the number.
    e.g.:
    1.1 first headline
    1.2 second headline
    1.3 third headline
    If I make the second headline/region invisible the output is:
    1.1 first headline
    1.3 third headline
    If anyone can give me some advice on how to get the numbering right, it would be greatly appreciated.
    Thanks
    Norbert

    Okay I solved this problem by creating XSL:FO variables and calculatedbefore the table of content.

  • Conditional region - multiple conditions

    Hello,
    I need to display a region only if 1) the page is in Printer Friendly mode AND 2) the value of a page item = 1. I tried using :P100_ITEM = 1 AND :PRINTER_FRIENDLY = 'YES', but that didn't work. Any ideas how to do this? Thanks.
    Lisa

    Hi Varad,
    I'm sure your response is the correct answer, but I can't make it work. I've put an example here: [http://apex.oracle.com/pls/otn/f?p=23292:8]. I'm probably missing one little piece somewhere. I put the different things I've tried (in addition to your suggestion) in the HTML region. The HTML region should be the conditional region. I can only get #1 (no conditions) and #4 v('PRINTER_FRIENDLY') = 'YES' to work. If you have a minute, would you take a look at the page and see if you can tell me what I'm doing wrong. It seems like the value in P8_ITEM is not being recognized. I appreciate your help.
    Lisa

  • Conditional Region - Advanced Tab Editing

    I'm looking to add XML to a Conditional Region's Advanced tab. i've already filled out the Properties tab with one condition, but want to add another. What is the code context I need to enter? I've searched everywhere with no success.
    Currently my Advanced tab shows:
    <?if:number(CompanyCode_ID)=1?> This results in: Show "Phone Number"
    Example of what I'm trying to do:
    <?if:number(CompanyCode_ID)=1?> AND/+ <?if:number(Rep_ID)<>010?> Need these to result in: Show "Phone Number"

    Look at usage example - http://i50.tinypic.com/17tkpl.png
    Maybe you incorrectly set XPath for your XML tags? Try use
    <xsl:if test="number(//CompanyCode_ID)=1 and number(//Rep_ID)!=010">
    or better set it with absolute paths

  • Best practice for conditional region display

    I feel like I'm missing something here...
    What's the easiest way to control display of a region only if the user has submitted that same page via a button?
    For example, I only want to display a search results region if the user has entered search criteria and pressed a "Search" button.
    Currently, I'm setting a hidden item value on page submission, and only displaying the region if the hidden item value = "SEARCH".
    Is there a better way?

    After click the Search button (Item Name = SEARCH),
    debug mode shows the following at the start of the SHOW:When you submit the page by clicking the button, the REQUEST will be set to the button name during accept procesing, not during the subsequent show processing (the request value for the latter can be passed in via the same-page branch you have defined)
    To verify this, create a dummy after-submit PL/SQL process with NULL; and a Success Message of "Fired", make it conditional upon REQUEST=SEARCH and make sure your branch has the 'Show process success message' checkbox checked.
    Now when you click the Search button, the page should re-display with the Fired success message.

  • Multiple pages vs conditional regions

    What are opinions and suggestions about:
    using several regions on a page, with a navigation list, and the regions only appear conditionally
    vs
    separate pages?
    Marion

    For example, we have Files Load report. This page has 3 regions (hourly load summary, daily load summary and monthly load summary). There is a dropdown for the user to pick which region/report to display. If the user selects "Hourly", then Hourly Load Summary region is displayed. As you can see, these 3 regions display different summaries of the same report group called "File Load Summary". You can split this into 3 different pages, and each page can display one summary (i.e. first page to show hourly, second page to show daily, and the third one to show monthly load summary). This means you have to duplicate various validations and branches, which are pretty much going to remain the same across these 3 pages.
    Just my thought.
    Ravi Adik

  • Conditional region display

    I am trying to add what I think is a simple condition to a region display with no luck.
    Trying to use the
    Value of item in Expression 1 = Expression 2
    with no luck.
    I have a text item P312_TABLE_NAME with the value SERVER.
    Yet, it does not display when the text item is SERVER
    What am I doing wrong?
    TIA

    Hi TIA,
    I had same issue and it was taking time. I tried your resolution. It worked pretty good. Thanks for posting your resolution to help others.
    Raj

  • Conditional Region Title

    APEX 3.0, RDBMS 9.2.0.4
    I have a report in one of my regions on a page.
    I see from the forum there is a way to edit the report template and remove the region title for the report.
    Is there a way to make the title conditonal? That is to display only when the report has actual data in it?
    Thanks in advance,
    Barry

    First, it worked, and I thank you.
    Not that I am complaining BUT ...
    why doesn't the condition evaluate the region source query (below) and determine whether one row was returned.
    select e.ename, e.empno, e.sal, d.deptno
    from emp e, dept d
    where e.deptno = d.deptno
    and e.ename = :p1_ename
    To be honest, I tried the EXISTS attribute in region condtion, but did not add the select statement you sugggested in Expression 1. My approach was not working and I figured I had it all wrong.
    So, as instructed by your response, I set the condtion to EXISTS and added the folowing query in Expression 1 and it will conditionally display the region:
    select 1 from emp e where e.ename = :p1_ename
    Whyt does APEX make you put in two queries: one for the region source and one to evaluate whether the region should be conditional displayed?
    I am sure there is a good reason and I am just curious.
    Thanks again for your help.
    Barry

  • Problems - Update Record/Conditional regions

    Hi,
    I am building an admin interface in ASP VBScript, and have
    built an 'edit' page which has a load of text fields, with initial
    values bound to the data in a database, and which are hidden or
    shown depending on whether there is data in those fields in the
    database. Then there is the Update Record behaviour to update the
    info in the database.
    However, when I go to the edit page on the web, and click the
    udate button, it returns an error - i.e.
    'there was a problem processing the requested URL'.
    Is this because there are fields on the page which, since
    they have not been displayed, are not being included in the Update
    Record?
    How can I get the update record to work?
    Please help!
    thanks
    Ian
    Using DW8 on Mac
    Server: Win2000

    Ian
    If you are simply hiding fields by setting their type to
    hidden then this
    should not cause an update script to fail. However if you are
    simply not
    writing them to page then this will cause an issue.
    I suggest that you turn off friendly http errors (in tools:
    Internet Options
    : Advanced) and then post exactly what the error is.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "iandobie" <[email protected]> wrote in
    message
    news:e6ji55$i8t$[email protected]..
    > Hi,
    > I am building an admin interface and have built an
    'edit' page which has a
    > load of text fields, with initial values bound to the
    data in a database,
    > and
    > which are hidden or shown depending on whether there is
    data in those
    > fields in
    > the database. Then there is the Update Record behaviour
    to update the info
    > in
    > the database.
    > However, when I go to the edit page on the web, and
    click the udate
    > button, it
    > returns an error - i.e.
    > 'there was a problem processing the requested URL'.
    > Is this because there are fields on the page which,
    since they have not
    > been
    > displayed, are not being included in the Update Record?
    > How can I get the update record to work?
    > Please help!
    > thanks
    > Ian
    >
    > Using DW8 on Mac
    > Server: Win2000
    >

  • Conditional region based on an application item

    Hi All
    I want control the display of a report region based on the value of a global item. The item is set to the strings 'TRUE' or 'FALSE'.
    In the region I have tried pl/sql expresion :item = 'TRUE'
    and also value of expression1 = expression2 and still no joy.
    What am I doing wrong ?
    TIA
    Asif

    Asif,
    The first technique should work. The second should be 'Value of Item in Expression 1 equals Expression 2'.
    Maybe you are checking the wrong case ('true' vs 'TRUE') or the application item has no value.
    Scott

  • ADDT - PHP - Conditional Regions - Help!

    Hi there!
    One question, how can I filter something coming from a database in PHP using ADDT, maybe using a conditional, for example, I have a table with posted jobs, those jobs belongs to departments, for example
    Brokerage - System
    Brokerage - Management
    Brokerage - Services
    Brokerages - Payroll
    Carrier - Real Estate
    Carrier - Documents
    Carrier - Programming
    etc.
    If you see, the departments are just 2 Brokerage and Carrier but in the database they are called like I described you Brokerage - Something and Carrier - Something.
    I want to have 2 HTML tables the table in the left with only posting the Brokerage Positions and the one in the right with the Carrier Positions, I used this on the left one: - hey, don't laugh! -
    <?php
    // Show IF Conditional region1
    if (@$row_rsBJ['Job_Department'] != "Brokerage") {
    ?>
    <?php do { ?>
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr>
    <td width="27%" class="ShowJobsPostings"><div align="left"><?php echo KT_formatDate($row_rsBJ['Job_Date']); ?></div></td>
    <td width="73%" class="ShowJobsPostings"><div align="left"><?php echo $row_rsBJ['Job_Department']; ?><br />
    <?php echo $row_rsBJ['CompanyInfo_COName']; ?> <?php echo $row_rsBJ['Job_City']; ?>, <?php echo $row_rsBJ['Job_State']; ?></div></td>
    </tr>
    </table>
    <?php } while ($row_rsBJ = mysql_fetch_assoc($rsBJ)); ?>
    <?php }
    // endif Conditional region1
    but didn't work, I need to filter with something like "Send me only departments that start with brokerage" or something like that, but my programming expertise is minimal, any idea? or suggestion? Of course, this using ADDTB
    Thanks so much in advance!
    Arturo

    Just a politely Bump!

  • How can I use a Looper inside a Repeat Region?

    I have a Dreamweaver standard Repeat Region applied to a HTML table containing two horizontal loopers. The HTML table is to display a list of company contacts for our members. The loopers display find for the first company but after that they stop. To key the loopers to the company Im using a trick mentioned by Günter Schenk in this thread: http://www.adobeforums.com/webx/.59b524b4/5. He calls it a sub query; at times I use to help myself by using some sort of "sub query" like the following
    <br />
    <br />Ive linked my looper recordset to the recordset used for the Repeat Region. Heres one of the looper queries:
    <br />
    <br />$KTColParam1_rsContactFeatures = "-1";
    <br />if (isset($_SESSION["kt_login_id"])) {
    <br />$KTColParam1_rsContactFeatures = $_SESSION["kt_login_id"];
    <br />}
    <br />mysql_select_db($database_RNW, $RNW);
    <br />$query_rsContactFeatures = sprintf("SELECT DISTINCT list_feature.description_feature, company.id_company, contact_cnt.idpremissions_cnt FROM (((company LEFT JOIN company_to_feature ON company_to_feature.idcompany=company.id_company) RIGHT JOIN list_feature ON list_feature.id_list_feature=company_to_feature.idlistfeature) LEFT JOIN contact_cnt ON contact_cnt.idcompany_cnt=company.id_company) WHERE company.id_company='".$row_rsContactAll['id_company']."' AND company_to_feature.id_feature is not null AND contact_cnt.idpremissions_cnt=%s ORDER BY company.id_company ASC ", GetSQLValueString($KTColParam1_rsContactFeatures, "int"));
    <br />$rsContactFeatures = mysql_query($query_rsContactFeatures, $RNW) or die(mysql_error());
    <br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);
    <br />$totalRows_rsContactFeatures = mysql_num_rows($rsContactFeatures);
    <br />
    <br />This is my link in both quires: WHERE company.id_company='".$row_rsContactAll['id_company']."'
    <br />
    <br />Heres the code for the connected looper:
    <br />
    <br /><?php<br />do { // horizontal looper version 3<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />As I said this works fine for the first item in the list but then it quits. Heres a screen shot of what I dont want: http://www.retirenw.com/images/help/looper_inside_repeat_region.gif
    <br />
    <br />Is there anyway to change the php for the loopers to make this work?
    <br />
    <br />Thanks for your help
    <table>
    <tr>
    <td>
    <img src="../images/bullet.gif" width="8" height="14" />
    </td>
    <td>
    <?php echo $row_rsContactFeatures['description_feature']; ?>
    </td><?php <br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);<br />if (!isset($nested_rsContactFeatures)) { <br />$nested_rsContactFeatures= 1;<br />}<br />if (isset($row_rsContactFeatures) && is_array($row_rsContactFeatures) && $nested_rsContactFeatures++ % 1==0) {<br />echo "</tr><tr>";<br />}<br />} while ($row_rsContactFeatures); //end horizontal looper version 3<br />?>
    </tr>
    </table>

    I found an easy solution.
    I moved my looper quires out of my head and into my bodyinside the repeat region (the Looper Wizard puts the quires in the head). I put the quires right before my looper code. Finally, I had to make sure my conditional regional code came after the looper quires but before the looper code.

  • How do I add a dynamic 'on sale' message or image?...using show region if?...

    Hi there
    Hope everyone is doing well......
    I have been trying to get this to work but cant figure it out......
    First....
    What I want is to be able to put an 'on sale' image ...... preferably an animated gif.... (little red flame circle with animated SALE,... the same as maaaaany sites).....
    So I have all my product listing and detail pages working fine.... And I know that I could create a new page that only displayed the items on sale.... So that I could just place the animated gif I need above all the items on the page and that would work..... But I have noticed that most sites I have seen dont have a separate on sale page they just have random items on sale.....
    So..... I have my administration section working great using dynamic lists and I can update the product information easily....
    SO I have put an 'on sale' checkbox in my insert/ update product info form......
    But I cant figure out how to make that checkbox trigger a 'show region if database is empty' behavior which would hold the animated gif and only be displayed if I check the checkbox in the product info form.....
    I think I am going about this the right way...... Does this sound correct?
    Is there an easier way..?
    Any help would be great....
    Have a nice day

    Hi there
    Thanks so much for your help......
    I got it all working perfectly.....
    Now I have a working animated sale gif that only appears on the products that I clicked the checkbox in my upload form
    I did not realize that once I had a looped region that everything I put in it would be looped..... I started by dragging my dynamic pro_sale thing... lightning bolt thing.. from the binding tab (not sure what to call those things) and then I inserted the animated gif and selected them both and applied the show conditional region behavior.....
    Then I figure out I didnt need the lightning bolt thing just the image and it still worked..... so thanks a lot
    So thanks again....

  • How to - link from HTML Region to Report Column?

    Dear Apex gurus,
    Ok, I'll go straight to my question. I have a file upload page with Report Region (conditional) which comes up after file uploading process. Under Report I have a column to delete uploaded file (column has an image in link, target in application, item name: P2_DELETE_ID and value: #DOC_ID#). Basically the Report picks up just uploaded file ID and allows me to delete the file by having Hiden Page Item (P2_DELETE_ID) and Before Header Process:
    BEGIN
    DELETE FROM EBA_ASSET_ORDER_TEMP_DOCS
    WHERE doc_id = :P2_DELETE_ID;
    END;with condition: Value in Expression 1 is Not Null, and Expression 1 set to:
    P2_DELETE_IDI have and another conditional Region (which is HTML) and it comes up after file uploading process as well. The region Source is:
    &lt;div id="FinalMessage">&lt;/div>
    &lt;br />
    &lt;div >&lt;a href="javascript:confirmFileDelete(htmldb_delete_message,'f?p=&APP_ID.:2:&SESSION.:REMOVE_ID:::P2_DELETE_ID:#DOC_ID#');">&lt;img >src="/i/delete.gif" style="position: relative; top: 1px;"/>Remove Uploaded File&lt;/a>
    &lt;/div>where id="FinalMessage" - is the Sucess/Error message from JS
    and .....href="javascript:confirmFileDelete....... - is my actual question. So, I am trying to hide my Report Region and show only my HTML region where I will be able using this (.....href....) link delete file from my table. I am able to dele file using report colum link but my .....href.... link dosnt want to delete my file, doen't even want to pick up file ID. Is there a way where I can link my .....href.... link to pull from Report Column????
    Thanks

    I am getting crazy now:
    It gives me an error message whan I am trying to add RETURN to my process, here is my process, seems to be fine and I can fined what is going on, may be I am blind:
    DECLARE
    n_size NUMBER;
    v_filename VARCHAR2(500);
    P2_FILE_INPUT VARCHAR2(1000) := v('P2_FILE_INPUT');
    BEGIN
    INSERT INTO EBA_ASSET_ORDER_TEMP_DOCS (DOC_ID, NAME, CONTENTS, mime_type, CREATED_ON, DOC_SIZE, FILENAME)
    SELECT ID, P2_FILE_INPUT, BLOB_CONTENT, mime_type, CREATED_ON, DOC_SIZE, FILENAME
    FROM apex_application_files
    WHERE NAME = P2_FILE_INPUT
    RETURNING DOC_ID INTO :P2_DELETE_ID;
    DELETE apex_application_files
    WHERE NAME = P2_FILE_INPUT;
    END;error:
    1 error has occurred
    ORA-06550: line 13, column 38: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 10, column 4: PL/SQL: SQL Statement ignored
    Edited by: Yasen® on Oct 5, 2009 3:28 PM

  • Re: A region with dynamic page def mapping

    Dear Friends,
    We are using Jdeveloper version 11.1.2.3.0.
    Our requirement is there will be one region(.jsff) , it have a af:table and some input text component, based on some condition it has to be binded withViewObjetct1 or ViewObject2
    (both the ViewObject will have the same column name).
    Is it possible can we use a region(.jff) with different page definition file.Based on some condition region is mapped with Pagedef1(having corresponding Viewobject1 iterator and tree binding)
    and in another condition it's mapped with Pagedef2(having corresponding Viewobject2 iterator and tree binding).
    Please suggest a way to implement this scenario.
    Thanks in advance.
    Best Regards,
    Vijay

    Found some helpful blog for this scenario.
    http://andrejusb.blogspot.in/2012/03/proxy-viewobject-and-dynamic-editable.html.
    But i don't think it will work for us, because we may add few columns in ViewObject2 and no dynamic components.
    Please give us your valuable opinion.
    Thanks,
    Vijay

Maybe you are looking for

  • Importing Music Video files to itunes

    Each Music video I import into itunes, even when I have the Music Video tab highlighted it goes to the Movies file? what am I missing here...Thanks Dell   Windows XP   Dell   Windows XP  

  • Substr function problem in oracle

    my requirement is that i am writing the stored procedure in which use *substr( source_string, start_position, [ length ] )* my 1 requirement i have i problem that the source_string is dynamically being passed as a parameter into the stored procedure

  • Sending � signs with JavaMail

    Hi chaps, At our company we use the JavaMail API through JNI to send emails externally to customers. Recently the business has decided that it would be nice to send pound (�) through, however it's not going to plan. Normally the messages are encoded

  • Find data in my DB ACCESS, I have an error in my query

    Hello All, I wrote this : String query = "SELECT c_cli_fact, Cli_fact.n_societe, " + "l_adressea, l_localite, c_postal, c_pays " + "FROM Cli_fact, Adresse " + "WHERE Cli_fact.n_societe = '" + rechnom + "' " + "AND c_adresse = c_cli_fact " + "AND c_ty

  • Loss of power during system utility, now there is nothing!

    I'm in desperate need of some here trying to figure out what happened when my notebook, a HP pavilion zd7000 CTO notebook suddenly shut off while running a utility program. I've taken the unit apart completely and there is no sign of any burn marks o