Page 1 of 1

Pff files

Posted: October 8th, 2013, 12:28 pm
by Maria
Hi Greg:
I'm sending parameters in the pff file and my question is if I can send more than one parameter, for example, pff file.
[Parameters]
Carp = 4 this is the value for the variable Carp
com = 2
dis = 1
This is possible?
From already thank you very much!
Maria

Re: Pff files

Posted: October 17th, 2013, 4:33 pm
by Gregory Martin
You can only pass in one parameter, which will follow the Parameter= statement. What most people do is pass in multiple parameters on the one line, using a delimiter to separate each parameter. For example:

Parameter=4;2;1

If the parameters are of fixed width, you don't even need the delimiter, and then you can assign the values like this:
REGION = tonumber(sysparm()[1:1]);
SOUS_PREFECTURE =
tonumber(sysparm()[2:2]);
LOCALITE_ARROND =
tonumber(sysparm()[4:2]);
QUARTIER =
tonumber(sysparm()[6:2]);
ZD =
tonumber(sysparm()[8:3]);
If the parameters aren't of fixed width, you'll have to use the pos function to parse the string to identify where your delimiters are. For example:
numeric underscorePos = pos("_",sysparm());
    
percentBlank =
tonumber(sysparm()[1:( underscorePos - 1 )]);
percentInvalid =
tonumber(sysparm()[underscorePos + 1]);

Re: Pff files

Posted: October 21st, 2013, 9:59 am
by Maria
Greg thank you very much ..! :P