Expand my Community achievements bar.

Presence option of object and saving document.

Avatar

Level 3

Dear All.

Let me ask you two things regarding LiveCycle from?

I’m faced with problems. especially presence option of object and saving document.

1. the form is consisted of 2 pages. Page1 show up when you open the file, and then after selecting “Option” in the first page, Page2 will be shown conditionally(Presence option of Page2 and sub-forms in the Page2 is Hidden). After saving form, Page2 disappears. Please let me know how to keep data in page2.

2. In the Page2, there is Add button to copy row up to 10 rows. there are 2 sub-forms, MDListSoft, MDList. they can be changed depending on Option in the first page. After Adding some sub-forms in the second page by Add button, I changed value of Option field. only first row disappeared. the others still remained. how to remove all of them, added by Add item button, when i change value of Option field.

Thanks.

Script in the Option Field [drop down type] -----------------------------------------------------------------


Test_Report.Page1.Details.Info.info_Option.infoSelect::change - (JavaScript, client)
var extPath = Test_Report.Page2;
var changeEvent = xfa.event.change;
    Init.setPresence(extPath, "visible");
    if(changeEvent == "Op1"){
            Init.setPresence(extPath.MDTitle, "visible");
            Init.setPresence(extPath.MDList, "visible");
            Init.setPresence(extPath.MDListSoft, "hidden");           
    }else if(changeEvent == "Op2"){
            Init.setPresence(extPath.MDTitle, "visible");
            Init.setPresence(extPath.MDList, "hidden");
            Init.setPresence(extPath.MDListSoft, "visible");               
    };

Script in the Add item button [Button type ] -----------------------------------------------------------------


Test_Report.Page2.MDTitle.Config_Add::click - (JavaScript, client)
var nNodes = 0;
var optionValue = Page1.Details.Info.info_Option.infoSelect.rawValue;
if(optionValue == "Op2"){
    nNodes = Page2.MDListSoft.resolveNodes("MDListSoft[*]").length;
    if (nNodes < 10){
    var obj = "";
        obj = Page2.MDListSoft.instanceManager.addInstance();
        obj.presence = "visible";
        }else{
            app.alert("MAX : 10");
        }
    }else if(optionValue == "Op1"){
    nNodes = Page2.MDList.resolveNodes("MDList[*]").length;
    if (nNodes < 10){
    var obj = "";
        obj = Page2.MDList.instanceManager.addInstance();
        obj.presence = "visible";
        }else{
            app.alert("MAX : 10");
    };
};

pic.JPG

0 Replies