I would like for my radiogroup to select one radiobutton by default.
Here is the value of radiogroup
Here is the default value which is diabled
Here is the radiogroup
Here is a radiobutton
Hello @Jennifer Ayache,
Do you really need to have a local variable that is from data type Species or could you just have it as Species identifier data type?
By setting the data type to Species identifier you should be able to set a default value.
Best regards,
Carolina Oliveira
Hii @Jennifer Ayache,
Firstly there is no need to take record type local varibale just change your local variable data type to soc_species identifier and on initialize of your Screen/Block Just assing desired Value(that you want to keep selected by default) to your local variable.
I am also attaching OML file for your help.
kind regards,
Sanjay Kushwah
there is no need for an OnInitialize, you can just give the local variable a default value.
You're absolutely correct, @Dorine Boudry. Setting a default value for the local variable is indeed the preferred method for this specific scenario. It's simpler and saves an unnecessary event trigger. However, using OnInitialize might be a valid option in situations where you need to dynamically determine the default value based on other conditions or user interactions within the Screen or Block.
Thank you for pointing that out, @Dorine Boudry . I'm always open to learning more efficient ways to code. Your suggestion is definitely a more elegant solution for this case. If you have any other tips or best practices that you could share, I would greatly appreciate it.
Thanks,
totally agree to do it in OnInitialize when some logic is involved