Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner - Creator II
Partner - Creator II

Change name inside a listbox

Hello,

I have got a question which probably has a very simple answer. I have a listbox with the name Business Unit, under the listbox there are 2 options to select, 1 and 2. I want to change the 1 and 2 in the names of the business unit (SP and Projects). I can't seem to figure out how to do this without changing the 200000 lines in excel were the data comes from.

Can anyone help?

Kind regards,

Paul

1 Solution

Accepted Solutions
8 Replies
Not applicable

change the expression on the list box to the following, or in the second expression you can place it on the script for that field:

if([Business Unit]=1,'SP','Projects')

if([Business Unit]=1,'SP','Projects') as 'Business Unit',

pauldamen
Partner - Creator II
Partner - Creator II
Author

Thanks a lot work great.

Only thing is if i select projects it will change the name of 1. (SP) also into projects, so it looks like:

1. projects

2. projects.

If I clear selections it will change back but is there anything to avoid this?

Not applicable

I do not understand what you mean.

From what I understood how you had it if you select 1 from the list box it displays only SP, if you select 2 it displays only projects.

The expression in the list box

if([Business Unit]=1,'SP',if([Business Unit]=2,'Projects'))

will change only the display of the list box. So if you use this expression and select SP, the current selection will show 1 as selected.

If you change the field in the script, then while it is loading it will change all 1's to show SP and all 2's to show Projects.

pauldamen
Partner - Creator II
Partner - Creator II
Author

Now if i select 1. the name projects behind the 2 disappears like this:

if 1 selected:

1. SP

2. -

If 2 selected:

1. -

2. Projects

I want to keep the names even if the other one is selected.

Not applicable

oh, I meant change the listbox to display only the expression (In the General Tab, Field Dropdown, scroll to the botton of the list and select expression )

pauldamen
Partner - Creator II
Partner - Creator II
Author

I'am sorry I don't understand which drop down you mean

Not applicable

Untitled.png

pauldamen
Partner - Creator II
Partner - Creator II
Author

Thanks it works!!