Action script - parameter output issue

Hi All,

Please I am having an issue getting the below Action script to achieve the desired goal of obtaining {parameter “ZONE”} from the Target_List.txt file
When I run it, I get the outcome in the attached file, which only correctly identifies the 1st parameter (ID) but does not identify the 2nd parameter (ZONE)

The content of the Target_List.txt file is as below:

7634,SD345
3601,DQ246

parameter "ID" = "{value of setting "Store Number" of client}"

parameter "ZONE" = "{if (exists file "C:\support\Target_List.txt") then (if (exists line containing "(parameter "ID")" of file "C:\support\Target_List.txt") then (following text of last "," of lines containing "(parameter "ID")" of file "C:\support\Target_List.txt") else ("AA0 0AA")) else ("AA0 0AA")}"

Most grateful for any assistance/steer on this.

Thank you.

Try taking the quotes off of "(parameter "ID")". As it is now, the relevance is looking for a line that literally starts with a parenthesis and the word ‘parameter’.

Try

parameter "ZONE" = "{if (exists file "C:\support\Target_List.txt") then (if (exists line containing (parameter "ID") of file "C:\support\Target_List.txt") then (following text of last "," of lines containing (parameter "ID") of file "C:\support\Target_List.txt") else ("AA0 0AA")) else ("AA0 0AA")}"
1 Like

That’s worked a charm!
I am absolutely blown away by the swiftness and accuracy of your response, Jason. You’re awesome!

Thanks, I’m most grateful for your assistance.

1 Like