Official Content

This type represents a key-value list and it can be used for many purposes. For example, it can be used as a filter in the GetAttribute method of LDAPClient Data Type. It can also be used with the Queue data type.

Properties

Count

Counts the number of items in the collection of properties.
It is available as of GeneXus 16 upgrade 10.

Type Returned: Numeric

Methods 

Set

Adds an attribute to be used as a filter. Learn more

Type Returned: None
Parameters:  id:Character(20), value:Character(50)

Clear

Clears all the key-value pairs added. Learn more

Type Returned: None
Parameters:   None

Get

Returns the value of a given key. Learn more

Type Returned: value:Character
Parameters:   id:Character

Remove

Removes the specified key. Learn more

Type Returned: None
Parameters:   id:Character

ToJson

It returns a string in JSON format.

Type Returned: json:Character
Parameters:   None

FromJson

It receives a string with JSON format and loads the variable with its content.

Type Returned: Boolean
Parameters:   source:Character


Iterating properties

The following code reads all the properties stored in a variable based on the Properties data type.

Sample

for &property in &myProperties 
    msg(&property.Key)
    msg(&property.Value)
endfor

&myProperties is a variable based on the Properties data type.
&property is a variable based on the Property data type.

Scope

Objects: Procedures, Transactions, Web Panels
Generators: Java.NET Framework, .NET

See also

Consuming JSON with GeneXus Properties Data Type

Last update: December 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant