ebs.getOptionSetItemsFromCache
Retrieves the cached option set items of an option set.
Syntax
Copy
function ebs.getOptionSetItemsFromCache(optionSetName: string, filter: any): IEbsMetadataOptionSetItem[] | null;
| Parameter | Type | Description |
|---|---|---|
optionSetName
|
string | Name of the option set. |
filter
|
any | Allows filtering of the returned option set items based on their status or value:
|
Return Value
Returns an array of JSON objects containing the cached option set items or null if the option set name is not valid.
For example:
Copy
[
{
"DisplayName": "Bulgara",
"Name": "Bulgarian",
"OptionSetId": null,
"OptionSetItemId": "e5e90b50-d575-4f35-874d-8bb89e7002fa",
"OrderIdx": 1,
"StatusId": "0e9a4ad5-a585-450d-bf59-65034420fd66",
"StatusValue": 0,
"Value": 0
},
{
"DisplayName": "Romana",
"Name": "Romanian",
"OptionSetId": null,
"OptionSetItemId": "b8588b46-d5fc-46c0-9ac8-05aadd1fd038",
"OrderIdx": 2,
"StatusId": "0e9a4ad5-a585-450d-bf59-65034420fd66",
"StatusValue": 0,
"Value": 0
}
]
Examples
In this example, we retrieve the cached option set items of the myOptionSet option set that acre currently Active and store them in the myCachedItems variable.
Copy
var myCachedItems = ebs.getOptionSetItemsFromCache('myOptionSet', {status: "Active"})