How to change the label column of a table ?

Hi,

My question is simple but I can't find an answer
Depending on the context (Form or View for example), I'd like the label column of a referenced table to change
I have created  "name" column and a virtual column "name_email" (which concatenates the name and email)

Depending on the context, I want to show "name" or "name_email"

How do you do this ?

Thanks

Solved Solved
0 12 125
1 ACCEPTED SOLUTION

In your case, you would need to have an extra column to read the name value only. And then show it on the inline view instead of name & date.

View solution in original post

12 REPLIES 12

JSO
Silver 2
Silver 2

In the column definition (after creating and saving it), in the Display area, there is a Display name section.
You can create an expression with (or whatever you need):
IF(ISBLANK(name_email, "Name", "Name Email")

JSO_0-1707818395631.png

 

Hi, no no no
I don't speak about the column "Display Name" section. 

I speak about the "Label" checkbox option. 

eric_niedergang_0-1707822318435.png

 

As per my understanding it is not possible with a straightforward way.

Could you elaborate a bit more on where you would like it to be displayed differently  so that we could evaluate if a workaround is feasible. Yes, you have mentioned a general requirement ( form or view) but a more specific description will help to evaluate the feasibility.

I could sum up my application as a quotation system
I add items to a quote and it calculates the total
I have a list of products that I can select by clicking on buttons (label: product reference + expiry date). The date is very important at this stage

eric_niedergang_0-1707828121932.png

 

And the products are displayed in the Inline view of the quote. In this view, I'd like the label to display just the product reference (to make it easier to read)

eric_niedergang_1-1707828237130.png

 

In your case, you would need to have an extra column to read the name value only. And then show it on the inline view instead of name & date.

Thanks @AleksiAlkio , you solved my label problem
I create a virtual column and I use this virtual column in the inline view !
Great !!

[cad] is my enum list of products 
I have created a virtual column cad_short = TEXT([cad])
And I use cad_short in the Inline view

 

It probably doesn't need to be a virtual column, normal could be fine as well.

The value of virtual column is updated with the value of the [cad] column. 

Unfortunately you can't change the label column dynamically. You need to use virtual (label) column and change the value depending on where you are using it.

I tried to use a SWITCH function based on CONTEXT values in order to change dynamically the value of the label but I think that the context is not evaluate in a virtual column ? Can someone confirm that ?

I am currently attempting to use dynamic labels in an enumlist in a Form.

Only CONTEXT("Table") is evaluated, but it returns the table name of the enumlist item, not the table that is currently being viewed.

In the editor, it will update occasionally while editing, and then the other CONTEXTs will resolve. But I think this is specific to the editor, I can't see how to make this work in the app.

crea una columna virtual que tenga la fรณrmula que quieres concatenar. Y esta debe cambiar de valor segรบn la condiciรณn. Luego la marcas como label. 

Top Labels in this Space