Make visible subform based on the dropdown value

I use this script successfully.

Form1. #subform [0]. typeOfIncidentDdl::change - (JavaScript, client)
assocInfoSubform.presence = 'hidden ';
custInfoSubform.presence = 'hidden ';

If (xfa.event.newText == "associate injuries") {}

assocInfoSubform.presence = "visible";


} else {}
custInfoSubform.presence = "visible";

}

But I would like to know how can I use numeric values in the object palette instead. For a drop-down list in the object > tab link, I click on the checkbox 'specify item values', where the values are, by default, the numbers, and the text is something I've specified in the tab field under "Items in the list." What is the syntax for the use of these numerical values instead of text? Here's what I tried without success.

If xfa.resolvNode(form1.#subform[0].typeOfIncidentDdl).value = "1"; {
[fields become visible and required with error messages]


} else {}
[fields are hidden and not required]
}

And this:

var oSubform = xfa.resolveNode("form1.#subform[0].typeOfIncidentDdl.Value");
If (oSubform = 1); {

etc.

And this:

var oSubform = xfa.resolveNode("form1.#subform[0].typeOfIncidentDdl.rawValue");
If (oSubform = 1); {

etc.

I need to be close, but I don't quite have the correct syntax. Thank you for pointing me in the right direction.

Hello

Good man Jono, I cracked switch statements based on his examples

I suspect that this is part of the reverse lookup that explained Paul.

My understanding (now):

  • xfa.event.newText is the new value, but it is not yet fully committed to the value of the drop-down list.
  • With the help of this.boundItem (xfa.event.newText); you use this newly modified (but not yet posted) value and it controls against known display items.
  • The switch statement then uses this display element, rather than the uncommitted newText.

I still think I have uses the event exit and rawValue, but "if it ain't broke, don't fix it!"

Good luck

Niall

Tags: Adobe LiveCycle

Similar Questions

  • Try to change the legend based on the dropdown value

    Two elements are involved:

    The drop-down list called TransactionType - possible values are 'A' 'B' or 'C '.

    Box chkVerification

    I created the javascript code to the change event of the dropdownbox TransactionType

    Form1. #subform [0]. TransactionType::change - (JavaScript, client)

    If (this.rawValue == "A") {chkVerification.caption.value.text.value = "Checking A"}

    ElseIf (this.rawValue == "B") {chkVerification.caption.value.text.value = "Checking B" ;}

    When I check the script syntax sometimes without error, but when I change the value in the drop down the legend of the box never changes.

    What I'm missing here?

    Using app.alert, I think I can see that I need to trigger the script as xfa.event.newText, but the legend is not changing.

    I also tried this: Form1.resolveNode ("chkVerification.Caption.Value. #Text"). Value = "audit has." Is what I'm trying to make even possible?

    The form must be registered as a dynamic PDF form to enable dynamic behavior, including changes to the legend.

    In addition, I find much easier to name pages explicitly. It is less problematic. So rather than going into "form1. #subform [0]. DropDownList1"you access"form1.page1.DropDownList1 ".

    Form1.Page1.DropDownList1::exit - (JavaScript, client)

    var char_ = this.rawValue;

    xfa.resolveNode("form1.page1.CheckBox1.caption.value.#text").value = char_;

    Steve

  • Show/hide subform based on the value of digital field

    Hi all


    I created my first form in LiveCycle Designer, but jammed with coding. Any help would be greatly appreciated.

    In the attached form, based on the value of field digital "number Total points" (calculated from the user of entry), I want two things to happen.

    The 'field' text should display different text depending on the points,

    • Less than 10 points is "beginner."
    • 10-14 is "intermediate."

    and just like that...

    If the total number of points is less than 10, 'Course for beginners' and 'Language' DropDownList must appear.

    Is there a way to do this? I tried posting 'If' 'else' statement, but it does not work. I looked in the previous discussions, but cannot find that anything will be based on the numeric value.

    You are looking for assistance.
    R

    The joint responds to your needs. The JavaScript on the TextField1 calculate event anime.

    Form1. #subform [0]. TextField1::calculate - (JavaScript, client)

    If (NumericField1.rawValue! = 0) {}
    If (NumericField1.rawValue< 10)="">
    DropDownList1.presence = "visible";
    DropDownList2.presence = "visible";
    this.rawValue = "beginner."
    }
    else {}
    DropDownList1.presence = 'hidden ';
    DropDownList2.presence = 'hidden ';
    If (NumericField1.rawValue< 15)="">
    this.rawValue = "middle";
    }
    else {}
    this.rawValue = "";
    }
    }
    }

    Steve

  • Can I make smart albums based on the location?

    Can I make smart albums based on the location of the GPS?

    For example, in the street, city, etc.?

    Thank you

    [City] - includes the menuFichier ==> new smart album - text or text [Street] etc.

    LN

  • How to make 'Save to Desktop' save the default value instead of 'This PC'?

    How to make 'Save to Desktop' save the default value instead of 'This PC'?

    Windows 10, I guess?

  • based on the prompt value see the FDF anayasis

    Hello

    I have a situation like this
    I use obiee 11g

    Based on the prompt value in him would like to show 3 different analayses.
    I mean that if the value of guest in the page has as abc data it should show the anlaysis1
    If the prompt value data as def it should show the anlaysis2
    If the prompt value data as the IGS, it should show the anlaysis3
    If the prompt value data as jkl it should show the anlaysis3

    Why 3 diff analysis is because I have my list 2 columns in each anayaiss and they are 3 different tables.

    One more thing

    Obiee do we have a show and a return value for a radiobutton/drop-down list. As show us abc how invites and returns 1. is possible?

    Thank you

    Published by: user123 on July 12, 2011 12:29

    You can have n number of reports, simply use the union all in the dash prompt sql results and this will give you the choice to select any report you want.

  • How to find the bpel instance in 11 g based on the index values

    We have 10 GB BPEL processes where we define the 4 index values for all instances. Whenever the support request comes, ask us the values of index and based on what we're looking for the process instance.

    We have now migrated bpel 10g and 11g process. How to find the bpel instance in 11 g based on the index values?

    You can go there. http://soasphere.blogspot.com/2011/04/how-to-Serch-composites-for-index.html. Do a join on the cube_instance and ci_indexes tables.

  • IR report visible cell based on the value of the hidden highlight column

    I have an IR with a date in the format DD-MON-AA column.  I have an obligation to change the background color of the date cell according to the day of the week (2 yellow =, 3 = purple, etc.), where Monday is day 2, Tuesday is the day 3, etc.

    My idea on how to proceed was to create a hidden like this to_char (date_col, 'r') column, but I can not set the background color of the date column based on the value of another column (the column hidden in this case). 

    Any ideas on how I can do this?  Can I use the Expression of implementation form/HTML column on the column date to set the background color; If so, can you give an example?

    Thank you.

    Use column formatting

    #COLTOHIGHLIGHT #.

    Add css to the page

  • Button makes visible subform, and then adds another instance

    Hello

    I have a button that makes a subform visible. Which works very well.

    I would like the button when a user clicks a second time to add another instance of the same subform. Is this possible? I have no idea how start with the JavaScript for this and would appreciate help.

    Thanks in advance,

    MDawn

    Rather than raise the subform, and then adding cases you can do simply by using the instances, then the button does the same thing.

    To 'hide' the subform using the instances, make sure that under binding that the Min County click on and the initial count is set to 0 (zero) - your subform is now hidden by default.

    Change the code you have showing the subform to use addInstance() instead of the presence, using the underscore for the Instance Manager shortcut (you must use the underscore method, because the instance does not yet exist):

    _hiddenSubform.addInstance (true);

    If you remove instances to zero then the subform will disappear again. Doing it this way also has the advantage of reset all data in the subform.

  • Popup is not refreshing based on the current value of the row in a table

    Hi all

    1.I have created an entity object View for the Table Emp

    2. then I created an editable view object based on the EMP table

    3. create a Page like jspx

    4 drag and drop the View object as read-only Table in this homepage

    5 drag and drop the view even object as in this homepage

    6 goto the shape and dressing with Popup

    7. then create a dialog inside the pop-up window

    8. then, go to the Table and then surround with a collection of panels

    9. create a button in the toolbar of the collection Panel name it as edit

    10. drag and drop the showpopupbehaviour the button change

    When I run the application. It displays all records in the emp table. If I'm in line 6. It shows the values of line 6 in the pop-up window, but if I moved to the next line which is the 7th and then press the button to change is to always show the 6th place of the values only.how to display the values in the pop-up window based on the cursor line .pls guide me in this.

    Thanks in advance
    C.Karukkuvel

    Hello

    Make sure you use contentDelivery = "lazyUncached" in the context menu

    Gabriel

  • void / vi based on the Boolean value

    Hello

    I have a main vi and I want to call a subvi based on a Boolean value, that is when the Boolean entry gets the true value, the sub - vi must run, otherwise it shouldn't.

    To do this, I added the Boolean control component connector of the sub - vi and I added a while loop in the sub - vi, which has 'continue if true' condition. I also made this point prescribed to the subvi.

    However, I noticed that even if the Boolean value false maintains execution of the sub - vi.

    Can you get it someone please let me know what the problem with this approach?

    Thank you

    Despres

    Put the Subvi code (or the Subvi set) inside the true case of a case structure and wire your boolean to that.  I prefer the second option.

  • Change the text displayed, based on the threshold value

    Hi users of Labview,.

    I need help with display and editing text in labview.

    The text should display and change according to the following conditions:

    0 volt - "no power".

    1 volt - "controller ON".

    2 Volt - "Rotor Running"

    3 volt - "Rotor stopped".

    Based on the voltage read by the channel, the text must be displayed and modified on the same area of the front panel. For example, initially it will be 0 Volt and the text "No power" should appear as an indicator of text (and not as a warning message). He needs to change ' controller we ' when the chages of voltage from 0 to 1 volt. The canal reads the analog input voltage (range 0 - 5V).

    I'm relatively new to labview. So please give me pointers or from suggestions on how can be done. Any help is greatly appreciated.

    Thank you

    REDA

    Hello

    Thanks for the crossrulz of notes, have not used the front threshold.  For this simple example, it is "symmetrical", but I can see how the values in the table have been does not correspond to the index position that is so true useful.  Learn something every day, I could not resist, wanted to try.

    OK, here's a sample VI that puts a custom message based on the crossing of a threshold.  Home work is to study the components before asking to :-)

    The dice are the analog signal of 0 to 6.   He rounded to the whole number to provide the index number.  Power is the index number in the index table, the table being hard-coded text messages.

    Two additional indicators may be deleted, useful to see what is happening.

    And get rid of the value 0 if you want the text to match the number, he he he

    Enjoy.

  • ListView, title change to header based on the stored value.

    Hello

    I'm new to native development, always trying to get a hang of how things are done in QML. I was wondering how it was possible to format the header in the ListView based on the value of the header. For example, the datamodel is sorted by name and status. Status is stored as an integer 0,1,2,3,4,5 in the database. Whenever the ListView displays the headers, I want to show the actual title of the State (for example in progress, completed) instead of display 0 or 1.

    Thank you for your help.

    If... else if... else must have worked well, please send your code.

  • Increment sequence based on the existence value

    Hello

    I have a requirement,
    I need the value sequence based on the values exist in the database.
    Let me explain with an example of a column, I have values such as 1,2,3,4,5,6,7,8,10,12,14, etc...

    Here I have to generate the value of the sequence 9,11,13 follows...


    Logically it please suggest me... I try with While loop I could not reach again.

    We want to help you.

    Concerning
    Rambeau
     select  level missing_values
       from  dual
       connect by level <= (select max(your_column) from your_table)
    minus
     select  your_column
       from  your_table
    /
    

    For example:

    with t as (
               select level n from dual connect by level < 9 union all
               select 10 from dual union all
               select 12 from dual union all
               select 14 from dual
              )
    -- end of on-the-fly data sample
     select  level missing_values
       from  dual
       connect by level <= (select max(n) from t)
    minus
     select  *
       from  t
    /
    
    MISSING_VALUES
    --------------
                 9
                11
                13
    
    SQL> 
    

    SY.

  • Conditional display in the text box based on the calculated value

    Hello

    I have radio buttons that each have a numerical value. For example = 1 A = 2 C = 0. In the example below, the total is equal to 5.
    examplescreen01.gif

    The sum is displayed at the bottom of the document and is passed to another text box:

    examplescreen02.gif

    Instead of '5' displayed in the text box on the right, it should display a "Control" Word like this:
    examplescreen03.gif

    The displayed word is based on the totals through this range:

    1-2 = 'absorbing '.

    3-4 = 'practitioner '.

    5 to 6 = "control".

    The script I used to pass the value from the left to the right text box in the chart above is:

    name of the field to text box;

    var cTextBox = 'Cabinet Talent strategy knowledge - total';

    get the value of the field with the name in cTextBox;

    var sTextBox = this.getField ("cTextBox") .value;

    Set the value of this field;

    Event.Value = sTextBox;

    That I need to add to this script to show one of the words, such as "control" above?

    I am a complete novice to scripting. I found the above script online and somehow got it to work.

    I thank very much for any help or pointers, you can provide.

    Best regards

    Chris

    Sorry, there were some errors in the code that I provided above. Try this:

    If (sTextBox > = 1 & sTextBox)<= 2)="">

    Event.Value = "absorbing";

    } ElseIf (sTextBox > = 3 & sTextBox)<= 4)="">

    Event.Value = "practitioner";

    } ElseIf (sTextBox > = 5 & sTextBox)<= 6)="">

    Event.Value = "master";

    } else {}

    Event.Value = "";

    }

    If it still does not respond, you can send me the file at [email protected] and I'll check...

Maybe you are looking for