cancel
Showing results for 
Search instead for 
Did you mean: 

Change visibility of table in interactive form through scripting

Former Member
0 Kudos

Hi all,

I am designing an interactive form in wd java. I used a table to display records in the interactive form.I want to make the table invisible if there is no data in the node. The table is wrapped in a subform . What scripting I need to do to make the table invisible if there is no data in the table node.

Thanks,

Satish Kumar

Accepted Solutions (1)

Accepted Solutions (1)

chintan_virani
Active Contributor
0 Kudos

Satish,

In fact NO scripting is required if you have used Repeating subforms. In the Object palette, the Binding tab displays the Repeat Subform For Each Data Item option. Set the Min Count value to 0 or leave it blank. If the Min Count value is set to 0 and no data is provided for the objects in the subform at data-merge time, the subform is not created when the form is rendered.

You can check more information regarding it [here|http://www.adobe.com/devnet/livecycle/articles/strategies_creating_forms_lc_designer8/strategies_for_creating_form_designs_using_designer8.pdf].

Chintan

Former Member
0 Kudos

Hii ,,

Thanks for your reply,,

By setting the min count to 0 for Repeat Subform For Each Data Item in object binding it worked..

Regards

Satish Kumar

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

You can do something like this:

1) Select the Object that you want to hide.

2) In the script editor, select

Show = Calculate

Language = FormCalc

Run At = Client

3) Now write this syntax

if ( $record.<SourceNode>.<FieldName> eq "Manager" )

then

Approve.presence = "invisible"

endif

Here Approve is the ID of the approve button in my form.

SourceNode Contains a fieldname. In mycase

SourceNode is "Employee" and FieldName is "Role"

4) Click on the "+" icon just above the script editor.

Save the form and run. This will work.

Thanks and Regards

shanto aloor