Hello,
I have a script that I want to run on the field when another field is equal to a specific value and have this script change the value of the field.
string CompanyN = Context.Field("Company").Text;
string Npc = Context.Field("NamePostCode").Text;
if(CompanyN == "Manage at home")
{
Npc.Replace(Npc, "Manage at home UB7 0LJ");
}
I've written this but nothing happens when i run the document recognition stage.
Thanks
J
Comments
1 comment
I assume this is a Rule script. If you are referencing 2 fields, you should put the script on a parent level of both fields. If the fields are under a Section, put the rule on the Section. If the fields are in a repeating group, put the rule on the repeating group.
If you put the rule on one of the fields, it may not execute because the fields are on the same hierarchical level. I have seen this before, if I understand you correctly.
Please sign in to leave a comment.