Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 5

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.

1 Accepted Solution

Avatar

Correct answer by
Employee

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

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.