191
Views
7
Comments
Solved
Check if text is contained in static entity
Question

I want to check if a specified claim name (text) is a registered claims. The registered claims can be "iss", "sub", "nbf" etc as its identifier.

My idea is to create a static entity RegisteredClaims, with the records "iss", "sub", "nbf" and so forth.

And in my server action, check if the records of the static entity contain the specified claim text.

How can I do this? There's no contain/ record filter method. 

I tried using Get method of the static entity and I got a warning "Unexpected Data Type - 'RegisteredClaim Identifier' data type expected instead of 'Text Identifier'. Recheck the expression or use a Data Conversion function."

Even if I ignore this warning, how can I check if the Get method returns an item or an empty item? I can't seem to match it against a NullIdentifier

UserImage.jpg
vikas sharma
Champion
Solution
UserImage.jpg
vikas sharma
Champion

Hi,

You can use ListFilter method on the list of static entities text. It will return true false after comparing text in the list.

regards

UserImage.jpg
Adelia Benalius

I tried that but got this error

UserImage.jpg
vikas sharma
Champion

In a server action you can get the list of text from static entity and then apply ListFilter on this list.

regards

UserImage.jpg
vikas sharma
Champion
Solution
UserImage.jpg
Adelia Benalius


ah ok so you need to put it in aggregate first.. thanks!

is there a way to include the Identifier in the aggregate? i can only see Id but no Identifier

UserImage.jpg
vikas sharma
Champion

No in aggregate you will get all the columns of the static entity. May be its just hide then you need to expand it. Like there will be some number of hide columns click on it, will be expand.

UserImage.jpg
Adelia Benalius

Yeah I've expanded it and saw only Id. I'll add another attribute for the identifier then :(

thanks!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.