Calling an expression in Field Value

I have a requirement for language localization where the field value rule contains property reference. I was able to localize the constant text and looking for the solution to localize the value of property referred

Eg:

Field Value Name- StageStatus

Localized value- Status:{.CaseStatus}

Here i need to get the localized value of .CaseStatus property value

Tried to the call localization function in Field value as below

Status : @getLocalizedValue(“{.CaseStatus}”,“pyCaption”,tools) but in UI system takes the function also as text.

Could anyone suggest if we can localize the value of property reference in Field value.

Thanks

Hi @AnupriyadarshiniiR, you can create a field value which takes an input param (casestatus in this scenario) and display {1}.

Then, call your function alongside passing your param:

@(Pega-RULES:Utilities).getLocalizedText(“FieldValueName\t”+Param.CaseStatus,“pyCaption”,tools)

Hi @SaurabhG7134 while trying this approach, field value is referred as Helper text in Section Rule.

Selecting created field value with parameter input in Helper Text didn’t show up with the parameter field to provide.

Could you please advise?

Thanks,

Anupriya

@AnupriyadarshiniiR do you have a DT where you can call this function before loading of the section? In that DT you can call this function and take the result in a property that can be then displayed on the UI.

In that case you can also set the param before calling the function.

@SaurabhG7134

Can you please elaborate it. In my case , I am updating the history field value, where {2} has to get the localised text. Can you give me solution how to insert the function in. Field value

@AnupriyadarshiniiR

we can use lookup control in field value, so that it will get localized text of property you provided in field value