Jump to content

Change the value of input data field?


jpoe

Recommended Posts

Is it possible to change(or blank out) the contents of an input data field? I have a text block for an address that includes an optional endorsement line for postal presorting. Depending on the value of another input field I want to "blank out" the contents of the endorsement field. I have tried the following but it does not work.

 

Using the OnRecordStart callback rule:

 

if (Field("source") != 'REG')

{

Field("endorse") == ' '

Field("breakmark") == ' '

Field("im_bar") == ' '

}

 

Any ideas?

Link to comment
Share on other sites

You can create a rule with the same name as a field, which will override the field's value, so that the Text Editor picks up the rule's value instead. So, for instance, you can create a rule named "endorse" and, in it, return either the field value or an empty string. And likewise for each field you want to override. This will work in any version of FusionPro.

 

Depending on the version of FusionPro you're using, you might also be able to use the FusionPro.Composition.AddVariable() function in OnRecordStart, like so:

FusionPro.Composition.AddVariable("endorse", "");

Again, though, whether you can do that depends on the version you're using. The other solution, creating a rule for each field you want to override, will work in any version.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...