Using Expressions in Attribute Labels

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Using Expressions in Attribute Labels

Post by kklosson »

I want to use expressions in attribute labels based on a table of user-defined labels. The labels must be fetched into context (obviously). Using the standard Edit Object action in Operations With Records, I see no way to fetch them into context. When I instead use a process, the context is not retained. For example:

FIND Labels Where... (this works)
Find Object Where...
Edit Object

It seems the EDIT Object action starts a new thread and the Labels do not remain in context when the form initializes.
I also tried putting the FIND Labels rule in the update rules with Form Initialization set to Yes, but still a no-go.
How does one go about having variable attribute labels from user-defined objects?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Using Expressions in Attribute Labels

Post by PointsWell »

Can you expand on the problem, it's not clear.

How many user defined labels do you have? Is system multi or single tenant?

If multi tenant and you've got a link between LIRU and the tenant record (and you don't have hundreds upon hundreds of custom labels, could you not just place a shortcut as the label text

Eg

Label = loggedInRegularUser.obTenant.Form1_atteibute1

The only proviso is that it becomes something else to drag around in SQL calls. Alternatives can be to set it as a string into the LIRU or the LIRUSessionVariables either whenever it is changed by the Tenant (Business rule IF Changed then find all Tenant Regular Users and change attribute) or when the Regular User logs in.

Finding the labelsBO and keeping the context is probably going to be a PITA if there are multiple customisable attributes per form and you find them all, how does the label know which of the way 5 Labels to use? I am guessing that the EDIT action as the last action signals the end of the operation and uses the default display logic.
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Using Expressions in Attribute Labels

Post by kklosson »

Thanks. I decided to hold the label values in the object itself. Works like charm.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Post Reply