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

Script Help - CONDITIONAL -


Not applicable
hello, I have a problem because I'd like to put a conditional sentence:

"if "TEXT FIELD NO1" = "MARK ANTHONY" then "TEXT FIELD NO2" = "43555668D"

I've got a "drop down list" and I want to set a value if a text field says something or a different value if the text field says something different.

How can I do this??


0 Replies


Level 10
I will use Javascript for my example. On the exit event of textField1 you could use code something like this:

if (this.rawValue == "MARK ANTHONY") {

TextField2.rawValue = "43555668D"

} else {

TextField2.rawValue = ""



Not applicable
THX, it worked for me even with FormCalc. I was wrong because I used = instad of ==


Not applicable

Hi All,

I have an small issue with respect to reading XML Datasource node. Initially I had done the same thing using the Dropdown list box change event by using the below code:


var stateDataNode = $record.resolveNode("StatesAndCities.SAPDetails.(SAPCode.value == " + this.boundItem(xfa.event.change) + ")");


Now I have requirement as the selecting the nodes from same XML Datasource based on the value entered in the TextField. So, I am using the below code in the 'Exit' event of the TextField to accomplish but it's not working. I am using this code in FormCalc :


var stateDataNode = $record.resolveNode("StatesAndCities.SAPDetails.(SAPCode.value == " + this.rawValue + ")");

Using the this.rawValue I am able to read the value in MessageBox, but not in the above code.

So, I am looking for the further help you guys. Please help regarding this.


Sree Harshavardhana


Level 4

I believe you need to use the dropdown's newText or some property like that in order to access it's new value.  this.rawValue on a Change event will get you what it previously use rawValue, you could put the code in the exit event instead of the change event, or as I stated previously, using the newText attribute


Not applicable

Dear AK,


As you said, I have my code with in the Exit event of the TextField itself and even I tried to use the newText property of the TextField but no luck!!!

Any other thoughts?