Question
Booking Holdings
IN
Last activity: 23 Aug 2023 22:15 EDT
How to pass property name dynamically to a function
Hello Guys,
I am trying to pass a property name dynamically to IsInPageList function so that I can check if particular page is having value populated for one of the property.
Example:
@IsInPageList("Global",Param.PropertyName,PageList)
So, Param.Property name will be set conditionally like "Country","Region" etc.,. But it is not working. Also tried to use pxGetProperty function instead of passing param name but getting error as IsInPageList function is expecting string.
Any thoughts?
Hi @Ramesh Reddy Battini: Ideally there shouldn't be a issue. The parameter "lookAt" in the function is of type string. So you need to pass the property name. Can you help to understand how you are getting the property name in your scenario?
Please also note that, this can lead to exceptions if the property name is not correct.
Thanks.