2D Array with Button Group?

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

2D Array with Button Group?

Postby john1598360627 » Tue Mar 14, 2023 2:41 am

I have a dataprovider column that is numbers. I want to convert these numbers into a display text so it's more readable for the user. However, I also want this data to be connected to a Button Group so the user can change the data in that column.

The problem is that the Button Group only takes a valuelist.

Is there a way to make the valuelist a 2D array where one column is the real value, and the other is the display text? And then, how would that be setup into an actual Input Group / Button Group?

ie

real value vs display text
[ 0, 'None' ],
[ 1, 'Read Only' ]
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm

Re: 2D Array with Button Group?

Postby mboegem » Tue Mar 14, 2023 10:10 am

Hi John,

if you create a valuelist having 'Custom Values' being entered like below, that should do the job.
Also mind the real value type setting of the valuelist being integer.
Code: Select all
None|0
Read Only|1
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: 2D Array with Button Group?

Postby john1598360627 » Wed Mar 15, 2023 11:26 pm

mboegem wrote:Hi John,

if you create a valuelist having 'Custom Values' being entered like below, that should do the job.
Also mind the real value type setting of the valuelist being integer.
Code: Select all
None|0
Read Only|1

That seemed to work! Thank you!
john1598360627
 
Posts: 169
Joined: Tue Aug 25, 2020 3:03 pm


Return to How To

Who is online

Users browsing this forum: No registered users and 7 guests