cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
niga
Frequent Visitor

Can value be changed depending on a property of another datacard?

I would like to set a checkbox to the default value when DisplayMode of another datacard is Disabled. The DisplayMode of the datacard depends on several conditions.  Any suggestion would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @niga ,

 

I think a good way is to insert a Timer control into the datacard.

v-xiaochen-msft_0-1612767027823.png

 

1\ Set the Timer control 's OnTimerEnd property to:

If(Title_DataCard1.DisplayMode=DisplayMode.Disabled,Reset(Checkbox1))

 

2\ Set the Timer control 's other propertyies to:

2.PNG

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

4 REPLIES 4
ganeshsanap
Memorable Member
Memorable Member

@niga Create a variable, set it's value as per you requirements, based on "several conditions".

 

Then you can use this variable at both the places, to set the display mode of datacard as well as default value of checkbox, like:

 

If(myVariable = "DisableCard", DisplayMode.Disabled, DisplayMode.Edit)

 

Similarly you can use condition based on variable to set the default value checkbox.

 

Microsoft documentationUnderstand canvas-app variables in Power Apps 


Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

Thank you for your response. But I'm still struggling.

 

Could you tell me where I can set a variable? If I understand correctly, particular kinds of "action" (such as OnSelect of a button) are necessary to set a variable. Is this correct? I

have no such kind of "action" type control.

 

What I want to do is to set a value of a checkbox to the default value when a property (a DisplayMode in my case) of a datacard is a specific value (Disabled, for example), but I don't want to do anything when the property is the other value (like Edit).

 

If there is a way to set a value of a checkbox triggered by the change of a property of a control, that would also work for my case, probably.

 

 

v-xiaochen-msft
Community Support
Community Support

Hi @niga ,

 

I think a good way is to insert a Timer control into the datacard.

v-xiaochen-msft_0-1612767027823.png

 

1\ Set the Timer control 's OnTimerEnd property to:

If(Title_DataCard1.DisplayMode=DisplayMode.Disabled,Reset(Checkbox1))

 

2\ Set the Timer control 's other propertyies to:

2.PNG

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

That works!  Thanks!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,054)