Is there a built-in, programmatic way to get at a field’s “Title”?
If there is, I have not found it.
Currently, I’m doing the following to get a field’s “Title”, but it’s prolly a bit overkill.
Let GetFieldTitle =
|||
Let title = ""
Try
Local lFieldInfo
fieldblueprint "Inventory", lFieldInfo, Parameter(1)
Let dict = Execute("FunctionValue "+lFieldInfo)
title = GetDictionaryValue( dict, "TITLE")
title = ?(title != "", title, Parameter(1))
Catch
nop
EndTry
FunctionValue title
|||
// pass in the field name. eg "PvtData01"
Let title = Execute(GetFieldTitle, "PvtData01")
Message title
If the field exists, and it has a title, the title is returned.
If the field exists, and it has no title, the field name is returned.
If the field does not exist, then an empty string (“”) is returned.
Question: is there a built-in way of accomplishing the same thing?
TIA!