Highlighted
Acclaimed Contributor.
Acclaimed Contributor.
234 views

Add dynamic subform

Hello.

For table device i have the form configurationItem.

I want to make a different view of some parts for my form, depending on user capabilty words.

My first variant works fine:

In FC for form, i set in temp variable ($MyForm) the value based on user capability word.

And in FD for subformat set this temp variable - $MyForm

In my second variant:

I put in $MyForm array with list of form names and for subformat set next - $MyForm[1]

But this subformat does not appear on the form. 

RAD debugger display right value in $MyForm[1] (same value as in the first method)

0 Likes
5 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Hello

Are you using the variable $lo.ucapex to find the capability words of the operator, in that case, your condition in the FC should look like, $var=index("capability word to search",$lo.ucapex)>0. and in the form, you should have only the name of the variable.

please confirm if this is correct 

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Yes, tha's right and that's what i did. And it's work.

But i need use array of forms. For example i set in FC (using Validation or JS) for one of CapabilityWord:

$MyForm={"MyForm1a", "MyForm2a", "MyForm3a"}.

And for second one CapabilityWord:

$MyForm={"MyForm1b", "MyForm2b", "MyForm3b"}.

And in FD set several subform which have for each of them $MyForm[1], $MyForm[2] and $MyForm[3]

===

And subform is not displayed , but RAD debugger shows right value in all variables.

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

maybe the issue is when parsing the array variable on sub format.. try to use different variables.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

But RAD debugger (when run it on form) shows right value.

 

Just for 2 capabilityword and 3 subform for each i will need use 3 variables and 2 lines for FC.

Instead 1 for array

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

I see.. well... if the display engine can not parse it I don't think you can do much.. try with the variables and if works go for it.
Good luck!
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.