Get record name from Ref Field for Document v...

references
(Jason Spicer) #1

Get record name from Ref Field for Document variable?

How can I extract the record name for an item id that was selected from

reference field to show in a document variable?

I had a ref field that is constrained by a select () valid if to show paints from a material table and the field shows the correct info and name in the app but when I use the document variable for that field, I get the Material ID (key) and not the name.

The only way around this was to create a virtual column that derefs the name of the record. Would love to avoid having to create a bunch of virtual columns to just get the names for the doc.

There is already a lot of columns and don’t want to slow the app any further.

Thank you very much for any help with this :slight_smile:

(Aleksi Alkio) #2

Have you tried to use label column?

(Jason Spicer) #3

@Aleksi_Alkio The label column is checked for the material name and it displays the material name in the app but when you use the document variable for that field, it pulls the material id and not the material name (which is set as label).

(Aleksi Alkio) #4

You could use deref expression in your document template like <<[Material ID].[Material Name]>>

(Jason Spicer) #5

That worked. I had to use <<[Ceiling Paint].[Name]>> and it is now showing the name instead of they key.

Thank you very much Aleksi!

(Aleksi Alkio) #6

You’re welcome