Jump to content

problem with an external data rule

Brian F.

Recommended Posts

I can't seem to get my rule to work for pulling info from an external data file. Everything is working right except for the part where I try to get the record number for the data I need.


It is creating the variable from the external file ok. Getting a value from my field data and assigning it to another variable is working. But when I try to assign the variable for the record number it is returning a -1 value, which I know means it can't find that value in my data. I don't know why.


Below is my rule and a sample of my data file.


var tabledata = new ExternalDataFileEx("Cgs01\\production\\Design - Jobs\\HillSchool_41294_flyer_M\\fusionpro\insert\\GiftTable6thform.txt", ",");

keyval = Field("CnBio_Target");

tablerecord = tabledata.FindRecord("Ask3", keyval);

amount1 = tabledata.GetFieldValue(tablerecord, "Ask1");

amount2 = tabledata.GetFieldValue(tablerecord, "Ask2");

amount4 = tabledata.GetFieldValue(tablerecord, "Ask4");

return amount1 + " " + amount2 + " " + keyval + " " + amount4;



$25.00 , $50.00 , $100.00 , $250.00


I saw a post from last year similar to my problem, but the question was never answered: why it didn't find the row the value. The response was "you need to decide what to do when the value isn't found for your job requirements".


Any help would be appreciated. Otherwise, I'm going to have to write a rule that uses 7 separate formated text resources.

Link to comment
Share on other sites

I think I figured it out. I think it had to do with $ and "," in the data file or was a bad combination of mixed data formats. When I used the "currency to number rule" on my field and took those characters out of my data it started working.
Link to comment
Share on other sites


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

  • Create New...