Relevance substitution failed

(imported topic written by gks123)

I am trying to create a task to map subnets to locations and I’m currently running into a “relevance substitution failed” error when I try to use the file created by appendfile.

I can run the task with “C:\temp\site_list.txt”, but I don’t know how to use the __appendfile / Site_list.txt in the second setting command.

delete __appendfile

delete Site_list.txt

appendfile 10.0.1.0,Site1

appendfile 10.0.2.0,Site2

appendfile 10.0.3.0,Site3

move __appendfile Site_list.txt

//Works, but uses a static file in c:\temp (for testing)

//setting “Site Name”="{ substrings after “,” of ( following texts of firsts “” of lines whose (it contains ( subnet address whose (it as string != “0.0.0.0”) of ip interfaces whose (loopback of it = false) of network as string) ) of file ( “C:\temp\site_list.txt” ) ) }" on “Thu, 01 Aug 2013 10:00:00 +0000” for client

setting “Site Name”="{ substrings after “,” of ( following texts of firsts “” of lines whose (it contains ( subnet address whose (it as string != “0.0.0.0”) of ip interfaces whose (loopback of it = false) of network as string) ) of file Site_list.txt ) }" on “Thu, 01 Aug 2013 10:01:00 +0000” for client

We currently use the Location Property Wizard, but that does not seem to be maintainable and it is difficult to verify once the task has been created.

(imported comment written by BrianPGreen)

The problem is that the Site_list.txt file is created in the site folder for the action that’s currently running. Like, the file actually lives somewhere like this: C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite

To work around this, you can use “client folder of current site” to get the folder where the file is created. That means you’d probably want to change file Site_list.txt to file “Site_list.txt” of client folder of current site. Here’s an example action that uses something like that:

delete __appendfile

appendfile Hello, world!

move __appendfile hello.txt

copy “{pathname of file “hello.txt” of client folder of current site}” C:\hello.txt