Label text using form variable

Hi,

I am trying to put the value of a form level variable as the text of a label. This works absolutely fine as long as the variable is one of the standard types but if I have a variable that is defined as a record and try to display just one of the fields it does not work. An example of the type of thing I am trying to do is:

form.js:

/**
 * @type {JSRecord<db:/mydb/mytable>}
 */
var myRecord = scopes.myRecordUtils.getRecord(pk);

form.frm:
I have a label that has the displayTags property checked, and the text property set to %%myRecord.my_field%%

When I display the form the label remains blank even though I can see that the record variable contains a valid record and the field I am trying to display has text in it. If I change the text property on the label to %%myRecord%% then I see the complete record in a sort of JSON format:

Record[DATA:Row(db:/mydb/mytable)[DATA:my_field=Text to display,CALCULATIONS: {}]] COLUMNS: my_field,

This would indicate that the the tags are working but not to extract a single field which is strange as it is able to do it from a relation?

Have I done something wrong, is this a bug or do I need to submit a feature request :(

The reason for wanting to do this is I need to display a number of fields from this (unrelated) record as labels and I do not wish to have to define 10 different form variables.

Thanks
Steve

Wouldn’t it be easier to create a seperate form based on the unrelated datasource? You can add the fields there and bind them like you would in any form and add the (sub)form to your other form? Then you don’t need any form variables.