Determines that the generated application will be using the standard URL query component style (identifying each parameter by its name) or another supported style.
|Named ||Parameters in the URL are named and separated by an ampersand (&)|
|Positional ||Parameters in the URL are positional and separated by a comma (,)|
Generators: .NET, .NET Framework, Java
Parameters are named by default in new Environments. This is to follow common or standard URL writing styles and to simplify Web Application Firewall (WAF) configuration, among other benefits.
When the Parameters Style is Named, the parameters will appear in the query string of the URL as shown below:
In addition, the order of appearance in the query string is not relevant. The code below:
is equivalent to:
When the Parameters Style is Positional, the parameters will appear in the query of the URL as shown below:
- Programs can read parameters received in a positional style even if the property is set to Named.
- Dynamic calls or Dynamic links use or create URLs in a positional style; they are not affected by this property.
- URLs of programs with encrypted parameters are not affected by this property.
Considerations when changing from Positional to Named
When you change this property from Positional to Named, all the code you wrote in GeneXus should keep working as usual.
This doesn't apply if you already expected a named parameter in the query string (See Sample 2 - Compatibility issue when changing from Positional to Named).
Other possible aspects to consider:
- Configuration of rules in the WAF
- UI Tests that verify the query string of the URL
- Length of the URL (since it is longer now).
This property applies only at design time.
Consider the 'Client' object with this rule:
It is running on example.com and called by another object with:
It will appear in the URL as:
- "http://www.example.com/Client?Mode=UPD&ClientId=1", when using Parameters Styles set to Named, and as:
- "http://www.example.com/Client?UPD,1", when using Parameters Style set to Positional.
Sample 2 - Compatibility issue when changing from Positional to Named
Suppose you have two objects, and one calls the other with a line like the following:
&ParameterValueStartPosition = &MyParameter.IndexOf(!"=");
&ParameterValue = &MyParameter.SubString(&ParameterValueStartPosition+1)
When the Parameters Style is Positional, you get the message "MyValue." With Named parameters, to get "MyValue" again, you need to change the code on the caller to the following:
To apply the corresponding changes when the property value is configured, Build any object.