Skip to main content

getAttributesByMarker

Getting all attributes with data from the attribute set

AttributesSets.getAttributesByMarker(marker, langCode)

const value = await AttributesSets.getAttributesByMarker('my-marker')
Schema

marker:* string
text identifier (marker) of the attribute set
example: 'form'

langCode: string
language code
example: en_US


This method return all attributes with data from the attribute set

Example return:

[
{
"type": "list",
"marker": "list1",
"position": 192,
"validators": {
"requiredValidator": {
"strict": true
},
"defaultValueValidator": {
"fieldDefaultValue": 11
}
},
"localizeInfos": {
"title": "My attribute"
},
"listTitles": [
{
"title": "red",
"value": 1,
"position": 1,
"extended": {
"value": null,
"type": null
}
},
{
"title": "yellow",
"value": 2,
"position": 2,
"extended": {
"value": null,
"type": null
}
}
],
"settings": {},
"additionalFields": [
{
"type": "string",
"value": "Your Name",
"marker": "placeholder"
}
]
}
]
Schema

type: string
attribute type
example: list

marker: string
textual identifier of the attribute (marker)
Enum: [ string, text, textWithHeader, integer, real, float, dateTime, date, time, file, image, groupOfImages, radioButton, list, button ]
example: list1

position: number
position number for sorting
example: 192

validators: Record<string, any>
set of validators for validation
example:

{
"requiredValidator": {
"strict": true
},
"defaultValueValidator": {
"fieldDefaultValue": 11
}
}

localizeInfos: Record<string, any>
localization data for the set (name)
example:

{
"title": "My attribute"
}

listTitles Record<string, any>
array of values (with extended data) for attributes of type list and radioButton
example:

[ 
{
"title": "red",
"value": 1,
"position": 1,
"extended": { "value": null, "type": null }
},
{
"title": "yellow",
"value": 2,
"position": 2,
"extended": {
"value": null,
"type": null
}
}
]

settings: Record<string, any>
additional attribute settings (optional)
example: {}

additionalFields: Record<string, any>
example:

[
{
"type": "string",
"value": "Your Name",
"marker": "placeholder"
}
]

example: {}