Hi @Ramole ,
So that I understand you correctly, you have a
- Drop down field that says either Open or Close and the source data field is a Choice field also and the drop down values are driven from this field.
- You want a button to change this to either Open or Close (instead of selecting from the drop down) and each click changes it to the other value from what it is presently
For this example I will use the names (replace these with your field and control names)
- StatusChoose for the Choice field]
- ChangeButton for the button
- vReset for a Variable I will use
So the OnSelect of ChangeButton would be
If(
StatusChoose.Selected.Value = "Open",
UpdateContext({vReset:"Closed"}),
UpdateContext({vReset:"Open"})
);
Reset(StatusChoose)
On the Default value of StatusChoose would be
If(
!isBlank(vReset),
vReset,
Parent.Default
)
One last thing - on the OnVisible property of the screen<
UpdateContext({vReset:Blank()})
All of this should do what you need.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.