I am not quite sure what you are trying to accomplish, but I will take a stab as I use a technique that might be helpful
If you take a given field or object and apply conditional formatting (no actual formatting needs to be applied) and assign the Condition "Formula is" using a let statement like...
Let ( $someVariable = Self ; "") // or maybe
Let ( $someVariable = IF (field = somevalue ; something ; somethingElse) ; "" ) // play with it and you will ge the idea.
This evaluates to a local variable $someVariable equal to the name of the field (reported by self) or whatever else you want that is usable elsewhere once the layout has been loaded or evaluated.
Self does not return the name of the field or object, only the content. Curious, Peter: what is it that you are trying to achieve with this?
Peter said, "I'm looking for something that works like "Self" but will return the fieldname or objectname of the "Self" object."
It would help to have specific example otherwise, as Deninger points out, the requirements are too vague to provide anything other than broad response.
Another broad suggestion ... check out GetLayoutObjectAttribute() which can provide a variety of combinations limited only by your imagination. Tooltips can set global variables when hovering a named object. Used in conjunction with GetLayoutObjectAttribute ( "objectName" ; "content" ) and its other options, you can achieve a great deal. :-)
Do you mean something like GetFieldname ( Self )? That will work within conditional formatting.
David, that sounds like what I was looking for! Thanks
I found this older thread in hopes solving a similar problem. As the function name would suggest, GetFieldName( ) only returns the name of the object if it is a field. Is there a way to get the name of any kind of object making use of "Self"? I'm attempting to use generic "Hide object when" calculation that can refer to the name of an object (specifically, an inserted icon). I've spent way more time trying to figure this out than would take to tailor each object's Hide rule. But, if it's possible, it might save me a little time down the road.
Thanks for this old discussion, and any thoughts you may have!
And to get info about each one:
I don't see how to make use of LayoutObjectNames() in conditional formatting or "Hide object when", at least when trying to reference the name of the object to be formatted. Perhaps I am missing something. I suppose this is an exercise in futility anyway, since it is plain enough modify formatting/hiding calculations for each object.