Expand my Community achievements bar.

SOLVED

Hidden subforms when form is opened

Avatar

Level 1

I am having a problem with hidden subforms. I have subforms that are orginally hidden, and become visible when an item in a drop down list is selected. When I save the form, and re-open it, the subforms are hidden again. The only way to make them visible again is to manually re-selct the item on the drop down list.

I have the following script for them:

form1.SubFormPage1.Information.Row5.DropDownList2::exit - (FormCalc, client)

form1.SubFormPage1.Information.Row6::initialize - (FormCalc, client)
Information.Row6.presence = "hidden" ;

and

if (DropDownList2.rawValue == "Aircraft Operation" or DropDownList2.rawValue == "Aircraft Maintenance") then;
Row6.presence = "visible" ;
else
Row6.presence = "hidden" ;
endif

I know that my issue is that I have the row "hidden" in initialize, but when I don't have that line of script, the subform is always visible.

Hope that makes sense.

Any help would be greatly appreciated!

Leslie
1 Accepted Solution

Avatar

Correct answer by
Former Community Member

1. Change to subform presence  is hidden . (always . )

2. While initializing the subform just check wheathere the required data is selected from the list box or not .

3. If the value is selected then it should be visible . otherwise it should be hiddden .

the above 2 and 3 is missing in the code .

Add the code in theinitaialize of subform whatever you written in the list box .

like same as

if (DropDownList2.rawValue == "Aircraft Operation" or DropDownList2.rawValue == "Aircraft Maintenance") then;
Row6.presence = "visible" ;
else
Row6.presence = "hidden" ;
endif

Now while openeing the PDF it will check the above condition and if its selected it will be visible otherwise it will be hide .

Regards,

Dhiyan

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

1. Change to subform presence  is hidden . (always . )

2. While initializing the subform just check wheathere the required data is selected from the list box or not .

3. If the value is selected then it should be visible . otherwise it should be hiddden .

the above 2 and 3 is missing in the code .

Add the code in theinitaialize of subform whatever you written in the list box .

like same as

if (DropDownList2.rawValue == "Aircraft Operation" or DropDownList2.rawValue == "Aircraft Maintenance") then;
Row6.presence = "visible" ;
else
Row6.presence = "hidden" ;
endif

Now while openeing the PDF it will check the above condition and if its selected it will be visible otherwise it will be hide .

Regards,

Dhiyan

Avatar

Level 1

I am having the same problem. However, it's not all the time. It seems to me that it depends on the originator of the form, although I haven't narrowed it down to that. Most of the time, the subforms are visible when the appropriate radial button is marked. Sometimes though, they are hidden until you manually reselect the appropriate radial button. Any suggestions on how I can correct this so that ALL forms come back visible when they mark the appropriate radial button?


EX:

They mark whether they need a rental car: Yes or No. If Yes is marked, a hidden subform becomes visible so they can complete information on the rental car.


Thanks!!

Avatar

Level 1

Did you put the same line of code that you have in your radial button in "initialize" of the hidden subform? That helped me and made my form work all the time.

Avatar

Level 1

Thank you for the suggestion! I currently don't have that in there, but I will add it and see if some people continue to have problems. Thanks!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----