Selecting a row in a data master on selection of an image and attaching an event

Claire White shared this question 3 months ago
Answered

Hello,


I've created a data master containing multiple rows. Each row contains a checkbox (image). I want to be able to simulate the selection of a checkbox in a row which simulates a different event (selection of a different panel).

Many thanks

Comments (10)

photo
1

Will each row select a different panel, or will some or all rows select the same panel? What kind of content will be in the panels? You could take a few different approaches to this depending on what you're looking to do.

photo
1

Hi Danielle, thank you so much for your help! Each row will select a different state in the panel. Many thanks

photo
1

8cef0bfa4f526fb39d4953315a0d6fd3

photo
1

Each checkbox with each row in the data master should show a different chip. So on click, (checkbox row 1) display chip row 1. Many thanks!

photo
1

Check out the attached example. Here's how it works:

1. Each of the three rows in the Data Master have their own unique ID number.

2. When you click on the checkbox rectangle, it sets the value of a Variable as the Current_Row (the row you clicked on).

3. There's three On Variable Change + Set Active Panel events on the base screen (click on the icon that looks like a monitor in the Outline palette). Each one checks to see what the value of the ID number in the variable is. If it's 1, it sets Panel 1 as active. If it's 2, sets Panel 2, and so on.

4. When you click on any of the check marks, it resets the variable's value to empty, and resets the Data List.

I'm not sure if it exactly fits the use case you were going for, but hopefully it's close enough to be helpful! Let me know if you have any questions.

photo
1

Thank you so much Danielle, this is exactly what I was looking for. :-)

photo
1

Hi Danielle, I'm so sorry to bother you again!! The condition you suggested worked perfectly. However, I have realised it would be better if I could try and achieve this outcome instead:


1. The table contains a number of rows. Each row contains a checkbox to select that row. On selection of the checkbox, a "chip" below the checkbox is displayed which contains the value of the object name selected.

2. The user can select the checkboxes in any order. Chips display below the table which correspond to the number of checkboxes the user has selected.

Action 1: user selects "Access template" OR Access rule OR Access rule policy OR Account OR ACS policy. Chip 1 displays below displaying the corresponding object name.

Action 2: user selects "Access template" OR Access rule OR Access rule policy OR Account OR ACS policy. Chip 2 displays below displaying the corresponding object name.

I tried to simulate this by adding OR into the condition but it didn't work. :-(

photo
1

Also - I have a data master which I'm trying to do something slightly different with. In this scenario, same as before, I want the checkbox to display a chip below the table - but also to display two radio buttons in the Allow/Deny column. Allow is selected by default. So on selection of permission - permission is allowed or denied. The radio buttons should be interactive too. I added a show action to the On Variable change event as in the previous example to display the radio buttons but it displayed them for all rows.

photo
1

Depending on how many rows you have in the Data Master, it might actually just be easier to create a regular table instead of a Data List. You'll need to create a pretty complex condition to address all of the possibilities. Instead, your condition could check to see if the checkboxes ticks are visible.

photo
1

OK thanks Danielle. :-)