on 09-27-2007 9:28 AM
Hello,
is somebody able to tell me, how to change the data-binding through scripting.
Background information:
I have different text-elements, based on specific flag the data-binding of one text-field should change. (Another text-element should be then populated)
Best
Carsten
Hello,
Please find the script below :
you can refer the text field here as well and accordingly depending on the value of the text field, you can replace the binding of the field2.
if (this.bind.ref != "") {
var DataBinding = this.bind.ref;
// the data binding may contain "$data.<root data name>" instead of $record
DataBinding = DataBinding.replace("$data."+xfa.record.name,"$record");
DataBinding = DataBinding.replace("$record.", "");
try this and let me know..this should work.
Hope this helps.
Best Regards,
Saujanya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saujanya,
thanks for you reply, but I couldn't get it up and running. Do I have to do a remerge of the form?
I tried to implement your script into a Textfield (e.g. exit event), by executing this, the textfield should change the content, according to its new databinding. Is it allowed to use
this.bind.ref ="$record.entry[*].city.population";
for changing the data binding?
Best
Carsten
hi,
i dont think this will work.You cannot ref the field name.
you have to take the data binding ref of the record, and then mention the field name which needs to be changed.
Coz ur question was to dynamically change the binding? isnt it? its not wrt to field value.. am i correct?
If not , please update the question with more details.
Best Regards,
Saujanya
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.