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

Actions: difference between read only vs. user entered fields?

Avatar

Level 2

Hello,

I've made two simple test forms. One works and the other doesn't and I think it's becasue of the state of a numeric field (read-only, user-enetred)? My two test files are here (they are dirt simple): http://dropcanvas.com/ix8zj I made them with LCD ES2. I've searched and tried every combination and change I could think of. The thing I'm trying to accomplish involves enabling a button when a value in a text field is reached.

Thank you very much for your time and any help you can offer.

Chris

Header 1Header 2
works_screenshot.pngdoes_not_work_screenshot.png
1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Chris,

The problem with the code the action builder generates is that it is based on the exit event of the GrantTotal field.  It does work but you have to select all checkboxes to get the value of 400 and then you have to tab though the GrandTotal field so the exit event if triggered.

Try removing the GrantTotal.exit event from action builder and change your calculate event to something like;

 

var total = parseInt(CheckBox1.rawValue) + parseInt(CheckBox2.rawValue) + parseInt(CheckBox3.rawValue) + parseInt(CheckBox4.rawValue);

if (total === 400)

{

   Button1.access = "open";

}

this.rawValue = total;

 

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Chris,

The problem with the code the action builder generates is that it is based on the exit event of the GrantTotal field.  It does work but you have to select all checkboxes to get the value of 400 and then you have to tab though the GrandTotal field so the exit event if triggered.

Try removing the GrantTotal.exit event from action builder and change your calculate event to something like;

 

var total = parseInt(CheckBox1.rawValue) + parseInt(CheckBox2.rawValue) + parseInt(CheckBox3.rawValue) + parseInt(CheckBox4.rawValue);

if (total === 400)

{

   Button1.access = "open";

}

this.rawValue = total;

 

Regards

Bruce

Avatar

Level 2

Hi Bruce,

That worked perfectly! Thank you for not only helping me to get it to work but for also helping me to understand why it wasn't working.

I really appreciate it!

All the best,

Chris