LT_Jason
Apprentice

Change the value displayed in a list view

Jump to solution

I've been searching, and have not found a way to do this.

 

The idea is that we want to change the value being display in a list view based on what is being returned by the SmartObject. For example the column Is Active is showing "Onboarded", and we want it to say "Yes".

 

3540i8E553B710F3A181F.png

0 Kudos
Reply
3 Replies
Andrew_Blinco
Apprentice

Re: Change the value displayed in a list view

Jump to solution

Hi jwstl98

 

You can do this using expressions. Add an unbound column to your list by dragging a datalabel onto the list. Then add an IF expression to the datalabel that checks the value of the "Is Active" SmartObject property and then returns "Yes" or "No" as required.

 

You can delete or hide the current "Is Active" column once you have done this.

Reply
jrwarwick
Novice

Re: Change the value displayed in a list view

Jump to solution

This is definitely the efficient way to go when you are just translating a low-cardinality value like a yes/no/maybe. But in a more complex situation, say in the case that you want a "dynamic" display value, say a display value based on a foreign key in another SmartObject, you might try changing the control in the List View to a Drop-Down List. Details:

http://community.k2.com/t5/K2-blackpearl/List-view-not-showing-the-quot-Display-quot-value-of-a-drop...

0 Kudos
Reply
K2CaveMen
Apprentice

Re: Change the value displayed in a list view

Jump to solution

So Expressions can take If Statements... AWESOME....

 

This post got my attention and attempt to reproduce in a Simple Item View with Rules from a button On Click.

 

First I transfer the content of the Text Box to 2 different Data Labels [ No problem ]

 

Later Have an expression with the IF Statement matching "Hello" and if is True, return "World" if not "Monkey"

 

I execute this as another transfer after the original Transfer.. I test with the Values and worked Great.

Noticed from the Data Label could not use in Expressions.. you might want to consider the input control or some params instead.

 

A second Rule execute and transfer the value from the Expression works AWESOME !!!.

 

 

4260iF34DD817E66656B9.jpg

0 Kudos
Reply