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. (*)

Return value Numeric

Methods 

Set

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

Return value None
Parameters  id:Character(20), value:Character(50)

Clear

Clears all the key-value pairs added. Learn more

Return value None
Parameters   None

Get

Returns the value of a given key. Learn more

Return value value:Character
Parameters   id:Character

Remove

Removes the specified key. Learn more

Return value None
Parameters   id:Character

ToJson

It returns a string in JSON format.

Return value json:Character
Parameters   None

FromJson

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

Return value Boolean
Parameters   source:Character


Iterating properties

In order to read all the properties stored in a Properties variable, the Property Data Type must be used.

Example

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

where &Property is Property Data Type.

(*) Available as of GeneXus 16 upgrade 10

Scope

Objects: Procedures, Transactions, Web Panels
Languages: Java, .NET
Interfaces: Web

See also

Consuming JSON with GeneXus Properties Data Type


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant