Is there a function which can give the data type of a constant? The function "getcontentdetailsbyuuid" doesn't provide that information.
Use Case:
I want to build a UI for the business users to manage few constants. The UI should dynamically display the type of field based on the data type of the constant. example: Display date field for a constant with "date" as the data type
Discussion posts and replies are publicly visible
Will this work for you?
fn!typeName(fn!typeOf(cons!YOUR_CONSTANT))
Is there a way to do this with a list of type "Content Constant"? Basically I have a list of data about constants and I want to get the type of each. I tried fn!typeOf("cons!" & fv!item) where fv!item is the constant's name. That just returned text for everything since it's technically text. I tried fn!typeOf(fv!item) where fv!item is the constant itself and it returns "Content Constant" for everything since they are constants (instead of telling the type of data the constant holds).
I am getting the constants with the Content Tools plugin and this code:
local!constants: a!flatten( a!forEach( items: ri!constantFolders, expression: fn!getconstantsfromfolder( rootFolder: fv!item, recursiveSearch: true ) ) )
Thank you!
Never mind, I answered my own question. I can just get the fn!typeOf(fv!item) where fv!item is the VALUE of the constant.