Merge Variables not working in Custom Label

{{Country__r.Postal_Address_Type_State__c}} (Level 5) in a custom label of a field properties not merging, Should show as:

Country (Level 4)

Is showing as:

(Level 4)

Hey Bill,

are you trying this in a table? the tables dont have context to a specific row value for the single label and i believe that is causing what you are seeing. i tried in a table and it replicated your results.

I tried in a field editor also and this did work for me with a different value on each row of data.

let me know. thanks!

in version 2 the component is in a “form”. In a “section” I have added a “Model Field”. I then selected a field to insert.

Using {{Country__r.Postal_Address_Type_State__c}} (Level 5)

The merge syntax does not work.

That makes sense. I was able to replicate this locally on the form and I believe I have a way to work around it. I will file a report on this to see what can be done in the product— since the form only displays a single record it seems expected for the label to be able to have the correct context (unlike the table).

To work around in the meantime, since the form displays a single record of a model, I would recommend using the global merge syntax in the label if possible. So instead of {{Country__r.Postal_Address_Type_State__c}} (Level 5) try {{$Model.ModelName.data.0.Country__r.Postal_Address_Type_State__c}} (Level 5). This worked for me locally and while its a little cumbersome it should get the job done.

let me know if you run into anything else!