Making Subform Instances Visible/Invisible

Hello,
      I am trying to loop through the Subform Instances of the form and trying to make them visible/invisible on the click of a Check Box. The script seem to run just fine but the values nothing happens to the subforms. The script is written on the CLICK event of check box and is as below:-
----- HAP_DOCUMENT.APR.HAP_DOCUMENT.Positions.DATA.CHECK_BOX::click: - (JavaScript, both) ----------
var
nCount = APR.HAP_DOCUMENT.T_ELEMENTS.DATA.instanceManager.count;
//var plan_value = this.parent.PLANS.rawValue;
var
plan_value = this.parent.parent.parent.Storage_Form.PLANS.rawValue;
for (var nItem = 0; nItem < nCount; nItem++) { // Begin Loop T_ELEMENTS after the Instance is created
var sub_Tele = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"]";
var tName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA";
var sCount = xfa.resolveNode(tName).instanceManager.count;
for (var sItem = 0; sItem < sCount; sItem++) { // Second Loop on T_COLL_CELL
var fName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA";
var tCount = xfa.resolveNode(fName).instanceManager.count;
for (aItem = 0; aItem < tCount; aItem++){ // Third Loop on T_FIELD
var gName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.VALUE_STRING";
var lName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"].simpleField.CAPTION";
var subName = "HAP_DOCUMENT.T_ELEMENTS.DATA["+ nItem +"].T_COLL_CELL.DATA["+ sItem +"].T_FIELD.DATA["+ aItem +"]";
var aVal = xfa.resolveNode(gName).rawValue;
var bVal = xfa.resolveNode(lName).rawValue;
var subVal = xfa.resolveNode(subName).presence;
if (bVal == "Position Number"){
if (aVal == plan_value) {
if ( this.rawValue == 1) {xfa.resolveNode(subName).presence
= "visible";}
else {xfa.resolveNode(subName).presence
= "hidden"; }
Is there any other way of addressing the properties of the Subform Instances? Could any please help me as to why there is no effect on the subforms?
Regards,
Shishir.P

Is the form saved as dynamic? Are you getting any errors in the javascript console?
Paul

Similar Messages

  • Making Portal Content Visible/Invisible at Runtime

    Hi SDNers,
    I'm having a Portal Content Hierarchy which goes till 5 levels. The hierarchy includes roles, subroles, worksets, pages etc at different levels.
    Now, the scenario is, not all the subroles should be visible to every user. I would like to make some WorkSets, Pages invisible for some user according to the specified role.
    Means if a user doesnt have authorizations to do certain operations, those Pages, WorkSets should not be visible.
    A Solution would be to prepare multiple Hierarchies according to the specified role. But those combinations are so many that I'm not feeling comfortable with the approach of making all the hierarchies statically.
    I tried to find the solution with "Portal Content Permissions" but unfortunately couldnt come up with one.
    Please let me know if anyone has any ideas for the same.
    Thanks in advance,
    Mausam

    Hi,
    Use PCDFilter, which can be used to filter role and workset content depending on the users.
    Check this for more:
    How to restrict the Users at Page level
    Greetings,
    Praveen Gudapati

  • Visible/invisible subform based on choices from 2 dropdowns

    Does anyone have an example of a form with subforms being visible/invisible based on the answers of 2 dropdowns.
    thanks for sharing

    Hi Jagan,
    It is probablly just how you set up the script.
    For starters, for Yes/No choices I think you would be better to use radio buttons instead of checkbox objects. So for example you would have four different radio button exclusion groups, each with a Yes and No radio button. Then in the Object > Binding palette, you would set the Yes value to 1 and the No value to 0.
    This way you can sum the four radio button exclusion groups and if the total value is >=1 then change the presence of the text field and highlighting to suit.
    There are some examples here that might help:
    Scoring options: http://assure.ly/uiKS6f.
    Tracking interaction (checkboxes): http://assure.ly/xDbtbx.
    Hope that helps,
    Niall

  • GUI elements visible/ invisible

    I need various different comboboxes to appear as the user steps through making choices.
    I am new to Swing and unsure whether I can make comboboxes visible, or whether I should have them on different JPanels and make these visible/invisible.
    Am a little confused 'cos I read in a book that only one element can be contained in a specific container region, so can I have several JPanels in the one region of the container at the same time?
    I am using border layout.
    If someone could please explain I'd sure appreciate it!

    There are many layouts availabled in Swing, BorderLayout, BoxLayout, GridBagLayout, CardLayout etc etc. Each of them have their own pros and cons. For instant, BorderLayout can only contain one element in a specific container region, like you said. It has 5 regions, North, West, East, West, and Center. Following link can give you more details about this layout.
    http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html
    Yes, you can make comboboxes visible or invisible.
    JComboBox.setVisible(true) or JComboBox.setVisible(false)
    You can do this to any other components as well, like JTextField, JLabel, JButton etc etc.
    cheers.

  • Making Addressbook duplicates visible

    Clearly there is no way to make Addressbook duplicates visible. I think this is a huge MUST. Please Apple can you address this!?

    Open the AppleScript Editor in the /Applications/Utilities/ folder and run the following exactly as written below:
    tell application "Finder" to quit
    do shell script "chflags nohidden " & quoted form of POSIX path of (choose folder with invisibles)
    delay 2
    tell application "Finder" to run
    To change the global setting instead of making single items visible, replace the second line with:
    do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
    (89379)

  • Access - Another Newbie Visible/Invisible Field Q

    With help from Maurice, I now have two fields and associated labels that become visible/invisible dependent on the selection/status of a checkbox.  The visibility is controlled in the AfterUpdate property of the check box.  See previous "field
    visibility" post.
    What I am now looking to do is have the visibility of those fields change as I navigate between records.  So if the checkbox is unchecked for a particular record, then the fields are not visible when this record is displayed in my form.
    Can someone tell me in which event this test should be applied?
    I'm thinking this should be a form event, but I don't see a change record event as such.
    Thanks
    Phil

    Hi Phil,
    You can accomplish this by using the 'on current' event of the form. That way when you navigate to another record you can trigger an event. Be aware though that this is a costly event because it will fire every time you go to another record.
    You can use the value of the checkbox as your trigger. Something like if me.checkbox=0 then me.label.visible=true or false.
    Let us know if that helps
    Maurice
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. Thank You
    The Office Corner

  • Alertbox on submit email if a subform is visible

    Hello,
    I'm trying to create a script that would show a alertbox reminding the user that he must join needed files to the email before sending it. But this message must only be shown if a specific subform is visible, if it is not, than it must tranfer to the email directly.
    I'm using the Lc subit by email button that is standard in Lc ES2 and I've been meddling around and I can't find a script for my probleme. I've used the general alertapp. but I really need the message to appear only if my subform is visible.. Hoping someone can help me with this. Thanks in advance for all your help.
    Melanie

    Hi,
    you can use a script in the preSubmit event of your Mail button.
    It will check the visibility of you subform and prompt a message if it is visible.
    form1.#subform[0].EmailSubmitButton1::preSubmit:form - (JavaScript, client)
    if (Subform1.presence == "visible") {
            // Show a warning message
              xfa.host.messageBox("STOP");
            // Cancel the submit process
              xfa.event.cancelAction = true;

  • Remove subform instance problem

    HI there
    I am using the following code to remove the last subform instance
    subform.instanceManager.removeInstance(1)
    However in test it appears to be removing the last instance but one.
    Can anyone help me fix this.
    Thanks
    Darren

    Hi Paul
    Many thanks for your quick response.  When I added that to my form it removed the first instance rather than the last instance.  I had a look on the links here and for any one else that has a similar prob the following seems to have fixed the problem
    subform.instanceManager.removeInstance(subform.instanceManager.count-1)
    Thanks again
    Darren

  • Subform instances problem

    I have a subform that reads data from an XML data file.
    For every instance of an XML data elelment - I want a new instance of the subform with the associated data -
    I cannot seem to get this to work - after many attempts.
    from the Live Cycle UI - The for It appears to be working , at least, the bindings are correctly indicating the right information for the subform - but the object palette is grayed out and I can't seem to figure out how to instruct the subform to re-instantiate for every occurrence of a particular XML data element.  It reads the first element encountered , one only .... and misses all other occurrences of the data element.
    would it be possible to zip up the form and the xml data file and submit it for a review -
    the form is actually rather simple - so this is even more frustrating  (Arggh)
    Thanks

    Thaks Paul ;
    I have sent the form and the data file - to the email yo listed.
    The form is signed, etc - and works normally - but i can' identify the issue for the subform instances -
    I gave it my best effort -
    Thanks for assisting .

  • Add Subform Instance

    Hi there,
    Would it be possible for someone to help with a problem I'm having trying to add a subform instance? I've looked at an example and tried to use the same method but for some reason cannot get it to work and I've no idea why! Happy to send the form if that helps.
    Any help greatly appreciated,
    Thanks.
    Ken

    //_<subformname>.addInstance(1); //is syntax do not get confused it starts with underscore followed by subform name (no need to give entire hierarchy)
    //and the number 1 in the parenthesis adds one instance if use 2 two new instances are added
    //check the example below
    // Invoke the Instance Manager to add one instance of the detail subform.
    _Section2Detail.addInstance(1);
    //Invoke the recalculate method to include the field values from the added subform in calculations.
    //add to forec the layout manager to redraw screen
    xfa.form.recalculate(1);
    if you still run into issues do email me copy at n_varma(AT)lycos.com.
    Good luck,

  • Adding subform instance - paging issue

    Hi,
    I have a form which includes a subform where one can press a button to add a subform instance.
    The subform is located in the middle of the page, with a small subform below it. 
    When I presss the add button to add the subform, the subform below the added subform goes to a new page.  I don't know why its doing this as there is plenty of room below the lower subform before the end of the page.
    I recently added data fields to the form.  Before I added the data fields, when I would press the add subform button, the subform below would not go to a new page.
    Any ideas?
    Andrew

    Just a thought but does your form content area extend to the bottom of the page or does it end at the same place the bottom subform ends?

  • Make region/Task-Flow visible/invisible inside the page created in composer mode.

    Environent_
    JDeveloper 11.1.1.6.0
    Webcenter Sites version : 11g R1.
    Problem statement_
    Below example is to demonstrate the usecase to make region visible/invisible inside the page created in composer mode.
    The problem with this case is the 'Show Component' property does not automatically evaluate its expression even after using the contextual event.
    We want the region to be refreshed at run-time just like it works with design time pages using Refresh, RefreshCondition attributes in pageDef.
    My Usecase_
    I have two task flows dragged in Webcenter Customized Page.
    First contains Employee list and Second  contains selected employee's manager name.
    By default when page loads second task-flow/Dragged-Box  should be hidden.
    When I select employee from first box, then immediately second box should be appeared with manager name.
    In the case when If Employee does not have manager, second box should be disappeared. Whole page should not be refreshed only the second box should be refreshed and hide.
    Regards,
    Niraj

    Hi Jiri,
    Thanks for your prompt reply..
    While referencing the taskflow in any page will create a region and makes entry in pageDef for that page.
    In the PageDef of that page I am using Refresh and RefreshCondition attributes of the taskflow tag in order to refresh the taskflow based on certain condition or parameter change.
    I want to achieve the same in run-time environment using composer mode. where I have the control over page but do not have pageDef (visually where I can go and add the attributes Refresh and RefreshCondition manually)
    I would be obliged if someone can help on this.
    Thanks
    Regards,
    Niraj

  • Make a Transparent container visible invisible

    helllo all,
    how can I make a Transparent container visible invisible depending to an attribute,
    can anyone lead me to resolve this ?
    thank you all?

    Hi,
    Create a attribute ( LV_VISIBLE ) type of boolean in context, then bind that attribute in the properties of the TC
    TC->properties->visble property, bind the attribute in visible property of the TC.
    Then when u want to visible that inside of on action write below code.
    Declare a node :data:  n_node type ref to if_wd_context_node.
    then node assign to that created ( LV_CISIBLE )attribute nade ( E/G : ln_node = wd_context->get_child_node( name = ' node' ) )
    ln_node->set_attribute( exporting name = `LV_VISIBLE` value = abap_true ). "for visible of the TC.
    ln_node->set_attribute( exporting name = `LV_VISIBLE` value = abap_false ). "for invisible of the TC.
    Regards
    Srini.

  • Making Subform invisible or visible

    Hi ,
    I wanted to make a subform visible or invisible on selecting a radiobutton.
    I tried using
    <subformname>.presence = "invisible";
    in the click event of radiobutton , but its not working.
    Please suggest a solution.
    Points will be rewarded.
    Thanks.

    Hello Thomas,
    You can use the following pattern of the Scripting to hide subforms.
    <formName>.<Subform Name>.presence = "hidden";
    few important points to remember :
    1. use scripting language as 'Java Script'
    2. write the script under 'initialize' mode and the Run at option should be set to 'client'.
    Hope, this helps in resolving your issue.
    Regards,
    Debasish

  • Making the seekbarhandle visible and invisible?

    Hi team I am using a FLV with skin set to none, and then dragging components from the stage A play/pause and seekbar   so it all works great but as part of the project a button gets pressed and a movie clip becomes visible above the FLV player.  I can stop the video, I can make the seek bar invisible, but I cannot get rid of the seekbarhandle! Anybody help me to target it? cheers
    sub

    Hi Sarah,
    You can use the following in WHEN-BUTTON-PRESSED:
    IF  GET_ITEM_PROPERTY ('CONNECT_STRING', visible) = 'FALSE' THEN;
    SET_ITEM_PROPERTY ('CONNECT_STRING', visible, PROPERTY_TRUE);
    ELSE
    SET_ITEM_PROPERTY ('CONNECT_STRING', visible, PROPERTY_FALSE);
    END IF;Hope this helps.
    Best Regards
    Arif Khadas
    Two posts before me so additionally I will have the statement that can be used to change the label of the Toggle Button.
    IF  GET_ITEM_PROPERTY ('CONNECT_STRING', visible) = 'FALSE' THEN;
    SET_ITEM_PROPERTY ('CONNECT_STRING', visible, PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('button_name', label, 'Hide Connect String');
    ELSE
    SET_ITEM_PROPERTY ('CONNECT_STRING', visible, PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('button_name', label, 'Show Connect String');
    END IF;Edited by: Arif Khadas on May 26, 2010 11:43 AM

Maybe you are looking for

  • Suggestion for a Premiere Elements 10 lesson book?

    I'm wondering if anyone can suggest a good book to learn Premiere Elements 10, hopefully one with lessons that you do on your computer as you follow along in the book.  A book that comes with a CD or DVD that has lessons on it, for example, might be

  • PSE 6 Blank welcome screen and nothing else

    Started suddenly, no issues previously. Installed on an iMac running 10.5.8. Blank welcome screen and nothing else. Tried reinstalling... nothing is working.... help!

  • What do those pre-boot kernel messages mean?

    Hi, directly after grub there are some lines printed on the screen (by the ramdisk or kernel?) and I don't know for sure what they mean. Especially the marked ones: :Loading Initramfs 963: No such process IP-Config: no device to configure Waiting 0s

  • General error (34) ??? tried everything FCP

    Hey all, I am confused here. Before you reply note that I am not hugely tech-savvy, you may have to break it down for me. I am using FCP and trying to export a basic 6 minute video. The source vid plays fine in quicktime. I have searched all over for

  • Please help !!!! How to get data into dropdown list box

    Hi all, I want to display data from ResultSet object to drop down list box in my JSP form. How should I proceed ? Please help me what should I do ? Thanks for any help in advance. savdeep.