Pff files

Discussions about CSEntry
Post Reply
Maria

Pff files

Post 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
Gregory Martin
Posts: 1803
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Pff files

Post 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]);
Maria

Re: Pff files

Post by Maria »

Greg thank you very much ..! :P
Post Reply