Creating if statements with 3 options

Hey
I have a Choose from List with 2 items, that if selected will pass the variable through for the Code variable.
But if the variable for Code is not set from the previous selection, i want the option to type a variable for Code.
but it does not ask for input even if there is no previous selection for the Code variable.
Can someone please point out my stupidity ?
if answer1 is equal to "PACKAGING" then
          set Code to "TA01"
else
          if answer2 is equal to "IPOP" then
                    set Code to "TA02"
          else
                    set Code to text returned of (display dialog ¬
                              "Enter Code:" with title ¬
                              "Create Client Folder " with icon 1 ¬
  default answer ¬
                              "" buttons {"Cancel", "Next…"} ¬
  default button 2)
          end if
end if

Are you sure it is Code that is not defined and not Job?
Just noticed you can possibly not have job set when you go to use it.
This works
set Code to ""
set job to ""
if job is equal to "PACKAGING" then
          set Code to "TA01"
else if job is equal to "IPOP" then
          set Code to "TA02"
end if
if Code is equal to "" then
          set Code to text returned of (display dialog ¬
                    "Enter Client Code:" with title ¬
                    "Create Client Folder " with icon 1 ¬
  default answer ¬
                    "" buttons {"Cancel", "Next…"} ¬
  default button 2)
end if

Similar Messages

  • Using once created prepared statement with different connections in Oracle

    Can I use same statement cash using different connections in Oracle
    For example I have a prepared statement p1. After its using i close connection (return it to the pool)
    Next time I want use p1 statement using another connection.
    Question : When I creat p1 in second time ,is it returned from cash or created as a new statement. And what I should do to use once prepared statement using differend connections.
    Thaks.

    As far as I know a PreparedStatement lives and dies with the Connection that created it. So, you cannot use a PreparedStatement with other Connection instances than the one that created it.
    You will have to recreate the PreparedStatement for each time you open a connection, or use the same PreparedStatement and NOT close the Connection in between. The last suggestion can be risky though, if you never close the connection...
    Jakob Jenkov
    www.jenkov.com

  • How do I create a dropdown with three options so that only one is visible in a form (non-flowable)

    I'm working on a form which needs to provides three options for the user out of a drop down list. When the user chooses one option, only that subform is to be visible. Two of the three subforms are text fields, and the third subform is a series of fields which are editable by the user.
    How do i create a dropdown with three options in it, so that in each instance only one subform is visible? This needs to happen in the same space on the main form.

    Hi Nellie,
    Here is the form back to you. There were three main issues:
    In order for dynamic behaviour, like showing and hiding, the form must be saved as a Dynamic XML Form in the save-as dialog.
    While you can use a minus sign when naming objects and subforms, it will cause scripts to fail. I have changed the name of the subforms so that they now use an underscore.
    The dropdown had specified values in the Object > Binding palette (1, 2, 3), so the script needs to use these in the if statements.
    When sharing forms on Acrobat.com, the best option is to select the file in your workspace and then click Publish. This will make it available to anyone who has the published URL.
    I hope that helps,
    Niall

  • Issue with : Stateful BSP Applications: New State Management Option

    Reference:weblog by Thomas Jung -  /people/thomas.jung3/blog/2004/11/09/updated-stateful-bsp-applications-new-state-management-option
    I see a comment by one user to send the complete code... I am not sure what else can be sent   - try it out rather than getting spoon-fed. - getting offline - sorry...
    I had two issues with this ITSM way of session handling.
    First - if you are using an SP42 environment, check CL_BSP_RUNTIME=>ON_SESSION_CMD() to see if CANCEL is defined as an option. If not make sure that you use &sap-sessioncmd=CLOSE" instead of the &sap-sessioncmd=CANCEL" . If CANCEL is not defined , it will give you shortdumps...
    Second - when I closed the window, the session was not terminated. I used onbeforeUnLoad="exitBSPApplication(); instead of onUnLoad="exitBSPApplication(); and it worked fine. Not sure if it has any other issues.
    But now I am facing a new issue... all but one application is not ending... I have no clue on why this is happening.. I am still checking..
    Thanks Thomas, you are the best, as always...

    Thanks for checking the code in your system.
    After some investigation, I found the behavior as explained below.
    If the actual url has any fields passed as parameters, e.g.. /default.htm?var1=a&var2=2 ...
    - if I use CANCEL as the option, a shortdump is created and the session is not closed. if I use CLOSE, Session is terminated and no shortdump happens.
    If the actual url does not have any parameters, e.g.. /default.htm ...
    - CANCEL does the work, but CLOSE does not exit the session.
    In my applications I used request->get_form_fields to see if there are any parameters, and if there are, then I use CLOSE as the option and else, I use CANCEL. So now, the session
    management works beautifully...
    There is a good chance that I am doing something wrong here too.

  • I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    I created a playlist with 100 songs.  I want those 100 songs played using the shuffle option.  This no longer works in iTunes version 11.1.5.5  How can I get an entire  playlist to paly one song after another by using the switch option?

    You're welcome.
    Going back to your original post:
    5) Tried running Itunes in 'safe mode', running itunes as an administrator..nothing.
    Was that iTunes' safe mode as opposed to Windows' safe mode? iTunes safe mode is invoked by holding down CTRL+SHIFT immediately after clicking the icon to launch iTunes and continuing to hold until this message pops up:
    Click continue, then close iTunes and reopen. With luck iTunes now opens normally every time.
    tt2

  • Issue when creating sales order with Sold-to/Ship-to Party's state

    Hi All,
    we have issue while creating Sales Order with picking up of State tax
    for Ship-to-party & Sold-to-party.
    <b>When we create a sales order, for the sold to party 140052732 and
    ship to party 140052733 it is picking state tax. Which should not
    suppose to pick? Because the partner is marked as tax exemption</b>.
    Can any body tell me how can we solve this issue!
    Why this is happening!
    How to make not to pick tax when it is marked for tax exemtion.
    As i am not Functional guy i am not aware what is happening here!
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi Deep
    What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
    If so go and check the condition record meant for it. Follow the following steps
    1) Go to Sales order
    2) Select the line item for which the state tax is being picked.
    3) In the condition tab select analysis.
    4) In Analysis you shall find the condition type meant for state tax.
    5) See which condition record has been found.
    6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
    7) If wrong correct it.
    8) If anything else come back to the post and inform the details
    Thanks
    Regards
    Sunil

  • Issue when creating sales order with Sold-to/Ship-to Party's state tax

    Hi All,
    we have issue while creating Sales Order with picking up of State tax
    for Ship-to-party & Sold-to-party.
    <b>When we create a sales order, for the sold to party 140052732 and
    ship to party 140052733 it is picking state tax. Which should not
    suppose to pick? Because the partner is marked as tax exemption</b>.
    Can any body tell me how can we solve this issue!
    Why this is happening!
    How to make not to pick tax when it is marked for tax exemtion.
    As i am not Functional guy i am not aware what is happening here!
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi Deep
    What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
    If so go and check the condition record meant for it. Follow the following steps
    1) Go to Sales order
    2) Select the line item for which the state tax is being picked.
    3) In the condition tab select analysis.
    4) In Analysis you shall find the condition type meant for state tax.
    5) See which condition record has been found.
    6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
    7) If wrong correct it.
    8) If anything else come back to the post and inform the details
    Thanks
    Regards
    Sunil

  • I created a broacher with a template using pages but am unable to save it in JPEG. I tried saving as a pdf then using preview save as JPEG but it did not give that option??

    I have created a boucher with PAGES  using a template. How do I now get that teplate to JPEG?
    I tried convertong it to a PDF then saving , but I never got an option to save as JPEG.
    Appreciate any assistance.

    What version of Pages?
    Peter

  • With As subquery block in create view statement or In pl/sql block

    Hi All,
    Can I use the With as subquery block in create view statement??
    or in pl/sql
    -Thanks
    Edited by: xwo0owx on Mar 31, 2011 11:23 AM
    Edited by: xwo0owx on Mar 31, 2011 11:23 AM

    Hi, Mike,
    Dird wrote:
    Then why do I get an error? :s create view mike_test_view as    
    with carriers as(
    SELECT DISTINCT T0.CARRIER_SHORT_NAME carrier_name,
    T1.COMP_ID            carrier_id
    FROM CS2_CARRIER T0, USER_FUNCTION_QUALIFIER T2, CS2_COMP_SERV_PROV_PROF T1
    WHERE (((T1.SERV_PROV_ID = T2.QUALIFIER_VALUE) AND
    ((T2.FUNCTION_CODE = 'DOC_CCM') AND
    (T2.QUALIFIER_CODE = 'CARRIER_LIST'))) AND
    (T1.SERV_PROV_ID = T0.SERV_PROV_ID))
    ORDER BY T0.CARRIER_SHORT_NAME)
    select *
    from carriers c;ORA-00942: table or view does not exist -- carriers
    If I run every line but the create (just execute the query) it runs fine. It also works fine in a PL/SQL procedure.SQL*Plus abhors a vacuum.
    The default in SQL*Plus is that you can not have a completely blank line (that is, a line containing only white space) in the middle of a SQL statement. (Blank lines are okay in PL/SQL, including SQL statements embedded in PL/SQL.)
    If you want some space between the end of the WITH clause and the beginning of the main query (or anywhere else, for that matter), you can put comments there. For example:
          ORDER BY T0.CARRIER_SHORT_NAME)
         select *
           from carriers c;Now that line isn't just whitespace; it has the comment sign, and that's enough for SQL*Plus.
    You can allow completely blank lines with the SQL*Plus command:
    SET   SQLBLANKLINES  ON

  • I can't create option with option none in the Pay

    Hello, i can't create account with option None i don't have this option help me ;-;
    Screenshoot:
    http://scr.hu/2hq0/8ljty

    http://scr.hu/2hq0/8ljty
    Screenshot

  • If Firefox is not the default browser is there anyway to create an "Open with Firefox" right click option for internet icons on the desktop??

    When internet icons on the desktop are right clicked and Firefox is not the default browser, is there anyway to create an "Open with Firefox" option in the right click menu? If not you should create one in future versions.

    You will have to create a copy of the Firefox desktop shortcut and add the URL to the target line if you want to open such an internet shortcut with Firefox.
    A normal internet shortcut will always open in the default browser.

  • What are the best options for creating a PDF with bookmarks and a hyperlinked TOC?

    What I'm interested in is whether or not there is an alternate process I could follow that would side step Word 2011's inability to export to PDF with bookmarks and hyperlinked TOCs. How do you create PDF documents with bookmarks and hyperlinked TOCs in your documents?
    Some background:
    In Word 2010 and 2013 for Windows (and I'm sure this applies to older versions as well), you can export documents to a PDF file format where the exported file will carry over the bookmarks and hyperlinked table of contents. Specifically, by making specific text headers, will appear in the final PDF file as bookmarks on the side (see image taken from Adobe's website).
    Regarding the table of contents, using Word's built in Table of Contents feature successfully ports the ability to navigate to a specific section by clicking on its chapter in the table of contents to the finished PDF file.
    I've read several forum discussions that say it's not possible to do this from Word 2011, so my current solution is to just finish all documents on a Windows machine (either with parallels or a separate computer). The alternate process flow of creating a word document, exporting it to PDF, then rehyperlinking everything in Acrobat is just too time consuming to consider.

    Hi, beejasaurus
    I found a possible kluge from this discussion here
    https://forums.adobe.com/thread/1008480
    Create the hyperlinks in Word, save the file
    Open that file with Pages, export as PDF.
    The links work from that PDF.
    Note, I did not try this with TOC but it worked with hyperlinks embedded in the Word document

  • Need to create a report with drop down option

    Hi,
    I have created a report with a simple query. Its a real time report.
    select host_name, target_name, instance_name from MGMT$DB_DBNINSTANCEINFO
    where target_type = 'oracle_database';
    It gives me a tabular report. It works fine. But it is a huge report about 1000 rows. We can see a particular number of rows per page. Thats fine.
    I need something else. I will select a particular target name from a drop down and the report will give me the result for the respective target only. Is that possible ? How to do that ?
    Thanks in Advance

    Hello,
    When you create your report, in the "general" tab, under Targets click on the first radio button named "A target will be selected by the report viewer when viewing the report" and under that choose target type="Database Instance".
    Then in your report query, use the predefined variable ??EMIP_BIND_TARGET_GUID?? to identify the target the report user will select at execution time; for instance:
    select host_name, target_name, instance_name from MGMT$DB_DBNINSTANCEINFO
    where target_type = 'oracle_database' and target_guid=??EMIP_BIND_TARGET_GUID?? ;
    regards,
    Noel

  • Error while replacing IF statements with DECODE function in procedure

    Hi All,
    I have created a procedure which has nested IF statements. Now I want to replace the IF statements with DECODE functions to improve performance.
    Procedure:
    IF (var_int_sev = '0')
    THEN
    var_sev := '2';
    ELSE
    SELECT sev
    INTO var_int_sev
    FROM errorconfig
    WHERE errorcode = var_errorcode;
    var_sev := var_int_sev;
    END IF;
    I converted the above IF statement into DECODE function as mentioned below:
    var_Sev := DECODE(var_int_sev,0,2,SELECT severity FROM errorconfig WHERE errorcode=var_ErrorCode)
    But it throws below error at the select statement used inside DECODE.
    Error(58,51): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specification> <an alternativ
    Can someone help me in converting the IF to DECODE in the above case. Also how can we use a select statement inside decode.

    instead of trying to rewrite all your code and hoping that the performance will be better, it's a better option to investigate and find out which part of your application is slow
    read this:
    When your query takes too long ...

  • Multiple Headings in a Report with Optional Sections

    I’m trying to create a BI publisher document that has a main section and two optional sections. The report is for an Oracle Apex 4.1 application so user responses regarding the sections they require is via an apex page. Apex allows session state variables to be included in the report data xml so the user responses are stored in the data xml. I’m using an RTF template. The problem is that the optional sections need to have different headings from the main report (and each other) and start on a new page. I just cannot get this report to work. I either end up with headings on blank pages or just blank pages when the user chooses not to have the optional sections.
    The queries for the optional sections have been structured in such way that they will only return rows if the user has selected the optional sections.
    This is what I’ve tried so far:
    Section breaks before the optional sections: The headers for the optional sections appear regardless of whether there’s any data to show. I have to use a section break that will produce a page break because we want the optional sections to start on their own page. Even if I surround the section break and the rowset for the optional section with an if statement I still get a heading on a blank page.
    Taking this a stage further if I try to suppress the header by completely surrounding it with an if statement with the appropriate report variable ie
    <?if:optional_section_1 = ‘Y’?>
    Heading text
    <?end if?>
    I just get a blank page instead.
    If I use the same header and footer throughout the document and use normal page breaks with the optional sections the report works fine.
    Templates: I’ve tried splitting the optional parts of the report into sub templates that have their own headings but these headings don’t show up at all in the final report.
    Start body/end body tags: That is placing the headers actually in the document text (rather than the actual headers and footers) but outside of these tags. I end up with both headers for the optional parts in my output document. The Oracle documentation “Creating Multiple or Complex Header and Footers” is rather sparse and the example doesn’t really cover what it purports to cover i.e. a document with multiple headings. I’ve done plenty of Google searches regarding this and cannot find any good examples.

    can you send me your template and xml to my email . I can try at my side : [email protected]

Maybe you are looking for

  • Sony PMW EX1 with Sony HXR MC50U?

    I currently am using the EX1 and am shopping for a low cost second camera to use in Pre Pro CS5.  I'm looking at the HXR MC50U which records to AVCHD in 1080i,  I use 1080Pin EX.  Are these compatible in same project in Pre Pro?  THe HXR records to 6

  • PLD Header hight

    How can I make the Header in PLD bigger. It looks in the design as ist is but the print out

  • Will not open some pdf's from certain people

    I belong to a yahoo group and we share pdf's back and forth very frequently.  I have at this point 3 seperate email addresses that I cannot open their pdf's.  Nobody else appears to have any issue with these pdf's.  Having said that, these are the on

  • I can't install Premiere Elements {new purchase} because of "Error 2350. 'FDI Server Error.'"

    I can't install Premiere Elements {new purchase} because of "Error 2350. 'FDI Server Error.'" I cannot "ignore"  I can only abort. Adobe says that my purchase is not supported even though it's new. Help anyone?

  • CVD Cess in J1iex

    Hi All, I have configured the new pricing procedure for CVD. I have used the Condition type JCV1. All the transactions arwe flowing smmothly, the only problenm is that the value of Cess is not flowing in J1iex. Do we have to apply any notes for the s