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

Asign Numeric Field Value to Another Numeric Field

GregDeb
Level 1
Level 1

I have 3 numeric fields on 3 different pages and I want to populate all 3 with the same value. If the value changes in 1 the other 2 should change. I've tried many variations, but I can't get it to work. Here is what I have right now. This is in the change event of "TopmostSubForm.Page1.SurveyNumber"

TopmostSubForm.Page2.SurveyNumber2.rawValue = TopmostSubForm.Page1.SurveyNumber.rawValue;

Any help is appriciated.

Greg

4 Replies
Jono_Moore
Level 10
Level 10

Give the fields  the same name  and on the Binding tab of the Object Palette change the Default Binding to "Global" on one of them.

GregDeb
Level 1
Level 1

That is an interesting solution that I will use for next time - or I may use this idea now.

In this case, the survey form is being emailed back and the XML data is already being stored in a database and then reported on. I would need to change all of the queries that produce the reports and change existing data. Not the end of the world.

Even if I do go that route, it seems I should still be able to use the change event to populate the other field. What am I doing wrong?

Greg

Jono_Moore
Level 10
Level 10

I'm not sure but maybe the Change event isn't the correct spot - try the Exit event?

TopmostSubForm.Page2.SurveyNumber2.rawValue = this.rawValue;

Other than that make sure you have the correct path to the other fields - with the cursor in the Script Editor use the Ctrl key to click on the field you want, it will change to a little "v" when you are over a valid field, and this will put the full path needed into the Script Editor.

GregDeb
Level 1
Level 1

Thanks. That got it. I originally had it in the Exit event but I apparently had the syntax wrong then. I then moved it to the Change event. Once I got the syntax correct and then moved it back to the Exit event all is working.

Greg