web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disabling a form item ...
Power Apps
Answered

Disabling a form item using a checkbox

(0) ShareShare
ReportReport
Posted on by 202

Hi All 

In an attempt to resolve an issue I have I just need  few tips to perfect my solution.

 

When an item used on a form is ticked as disabled it must not show on the form drop down list .

 

What I have done is I have created a simple table  in SQL Azure  called Accident group : in that I have three  fields  an Id int , Name  (nvarchar) and the Disabled field as an integer which is either 0 or 1 . 0 = enabled ,1 means disabled 

 

In my form control where I maintain this record I have a checkbox in the same data card as the field Disabled I go and

 Update  the data-card with the formula: If(Checkbox1.Value=true,1,Checkbox1.Value=false,0) .

 

Once I have ticked the checkbox and saved the item it must update to 1 meaning it is now disabled  and on the form drop down it not available which works and what aim trying to achieve.

 

If unticked it must change the value back to 0 and the item must show on the drop down again .

 

This sort of works but is stoping from time to time .

 

  • First thing i see once i click the save button and go back to check i see the checkbox  control is unticked for my save I am using this formula:Set(GlobalApp,DataCardValue12.Text);SubmitForm('Edit_Accident group');If('Edit_Accident group'.ErrorKind.None=ErrorKind.None,Navigate('Administration_Accident group',ScreenTransition.None)) Iam supposed to add anything else for the checkbox to remain ticked ???

 

  • When I check the table after I have ticked the checkbox sometimes it does not update the 0 to a 1 and aim not sure why? .I have to click edit and edit button Iam just using a Navigate(Screen transtion.None)  formula , click re-save the record and try again .

 

  • On the capture form I do not have an issue on the drop down because once the record has  been updated to 1  ,I do not find it on the drop down and when  I go back and update it to 0 it becomes available again , but just to give the bigger picture aim using a Filter('[rp].[Accident group]',Disable=0)

Any tips on how I can perfect this in short if check box is ticked the disabled must become 1 meaning the item is disabled and must not show on the drop down and vice-versa when the check box is unticked disabled status = 0 and the record must show on the drop down .

My Sql table.PNG

 

My maintenance screen.PNG

My add the record and disable screen.PNG

 

When both item are 1 nothing shows on the drop down because it has been disabled.PNG
When 0 it must show on the dropdown.PNG
Categories:
  • Verified answer
    a-ovbord Profile Picture
    Microsoft Employee on at

    Hi,

     

    Regarding the checkbox not staying ticked, try to make a condition for your Default property of the checkbox depending on the results from the dataset on that save button.

     

    Can you simplify the formula for inserting the 0 and 1 for the Disabled column and take it from there?

     

    Thank you.

    Ovidiu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard