designing form to be either filled in directly in the form, or for data to be imported into the form. | Community
Skip to main content
MHWinter
Level 4
February 7, 2022
Solved

designing form to be either filled in directly in the form, or for data to be imported into the form.

  • February 7, 2022
  • 1 reply
  • 630 views

Reacting to @radzmar recent comment about scripting a field's visibility instead of setting the visibility in the object properties:

I have designed forms that can be either filled in directly in the form or by importing data into the form. The problem I  had with that is that importing data would not trigger the scripts that I initially placed on action events (like click, change, etc....) 

As a result, I modified these scripts and placed them on calculate events, to determine the visibility of a field based on the value of another one.

this had a great advantage of showing the fields in the design view (making them more accessible while designing/scripting the form),... but I realize this is not ideal because it runs the scripts all the time (and there are many of them)... possibly contributing to slowing down the form.

More recently, I thought of adding a button that the user would click after importing data to run all the scripts once to run calculations of some fields and set visibility of others. 

 

What would be the real best practice to address this situation, when a form can be filled in directly in the form or by importing data?

 

Thank you for your thoughts and ideas on this.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Tiwari

Yes, you should be doing this by adding a button to trigger the scripts only for once. This will not impact the performance of the form.

1 reply

Mayank_Tiwari
Adobe Employee
Mayank_TiwariAdobe EmployeeAccepted solution
Adobe Employee
February 8, 2022

Yes, you should be doing this by adding a button to trigger the scripts only for once. This will not impact the performance of the form.

MHWinter
MHWinterAuthor
Level 4
February 8, 2022

Thank you @mayank_tiwari