Page 1 of 1

Special $exists

Posted: Wed Feb 28, 2018 7:46 pm
by momocampo
Hello,

Maybe another new function could be useful.
The $exists function find if file exists in folder, maybe a similar exists function could be created to find a string in a text file or a xml file(F ex :$find).
It will be useful to conditional the content of a text file to somewhere in particular.
I hope no function like exists but I don't think so.
Thanks.

Benjamin

Re: Special $exists

Posted: Wed Feb 28, 2018 9:37 pm
by admin
You don't need a special function for that. You can just use the "Conditional" node to test:
*my string*=%s_my_variable%

So if the variable %s_my_variable% contains: "some text and my string and some more text", your string should be found.

-steinar

Re: Special $exists

Posted: Wed Feb 28, 2018 10:23 pm
by momocampo
Hello Steinar,
Thanks for your help it works but not in this order (or I don't understand well).
In conditional node , begin by <if %s_my_variable% = *my string*> then it works :)
If I do reverse if string = variable I have error populating.
Anyway, thousand of thanks!!!!

Cheers

Re: Special $exists

Posted: Thu Mar 01, 2018 8:17 am
by admin
It should not matter what the order is, FFAStrans just compares the two. But I'll double check.

-steinar