Other option than Show and Hide

Situation:
I have two list on one page. Each Row has a label ‘Default’. By clicking the contextual menue I would like to show an overlay on which I can select to set another input to Default (showing the label) or to delete the specific row.

Conditions:

  • Only one Default can be set (visible) per section
  • There must be one Default from Start in each section
  • A Default option can not be deleted

I would like to have a slim solution on which I do not have thousands of if-clauses. Can someone please give me a hand with this?

Regards
Karin

Test_Choices_Default.rp (121.5 KB)

Honestly I don’t really understand exactly what it is you want to achieve, but from the looks of it you might want to look into using filters for repeaters. You could have an extra column to track what’s set to default and filter on that.

Hi nkrisc
Thank you for your reply. I do not think that the filter can solve my issue.
Process:

  • My list has one item from start. Because it is only one item, it is set as default.
  • When I then add another item to the list (with the help of a repeater) the lists contains 2 items.
  • The prior one which is set as default and the latter one. --> So changing the default state is easy with adding a if-clause:
    «If visibility of Widget priorItemDefault then hide and Widget latterItemDefault show:»

This case gets more complex when I have 3 or more items in my list. So I would like to have a formula which does it automatically.
Example:
Item1
Item2
Item3 (default)

I now click on item1 to set as default. Something like: Mark Item1 show Default Widget hide Default Widget on item 3.

I hope I was able to describe it more clearly now. Please let me know in case I screwed it up again.

Regards
Karin

I still think you might be able to do this with a repeater and a selection group, which I think works in repeaters. If so, you’d have a widget in reach row as part of a selection group which would deselect all other widgets in the group when you select a different one. You could then build any additional logic you need off of the selected state of the widget in the given row, like if you need to hide something.