Default Value for Custom Radiobutton Design

Hello :sunny:

I’ve created my own radiobutton design in my solution. I’ve made it as a reusable element. I have everything working except for setting a default value. Any tips?

Custom state?

I have tried, but I didn´t get it to work. Do you know how?

I also tried to make a property, but I didn´t get that to work either.

On your custom checkbox element add a custom state with boolean (y/n) type.
Add 2 WFs to switch between y/n states with maintaining only when… conditions properly.

You can do it even within 1 WF, but this setup is sometimes confusing for understanding: in “set state” action for the value field add current value is "no". This way the logic will be:

  1. old custom state value is “yes” → current value is "no" = no → new custom value is “no”
  2. old custom state value is “no” → current value is "no" = yes → new custom value is “yes”

Thank you. But I don’t understand where or how to set RE to default to a value.

My radio buttons display the customer’s work shifts, for example Day, Evening, Night.

I already have a CS “Selected Workshift”.

When clicking on one of my radio buttons, I have this WF, and it works.

I want to set the default value to be the first item in select_dbo_workshiftmaster.

I solved it! I added a WF that sets the same state I alredy have when page is loaded!

You don’t need any workflow to set the default value.

You can add two parameters to the reusable:

And the radio button will use these as the source and default:

And when you are using it in the page, you can just pass some data:

Here is the editor if you want to check details:

I am not using the build in radio buttons. I made my own. :slight_smile:

1 Like

It is still possible without page load action I guess. Check the reusable_radio_2 in the editor.

It is simply, the conditionals:

1 Like