cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmaziwis
Resolver I
Resolver I

Disable A record and Ensure user is not able to use it on the Form

Hi All 

 

I have an issue  I need to resolve , In the App  I have an admin section where the Admin users go and perform maintenance for records captured on a form in this example I will use Accident group where there can add ,edit or disable these Accident groups .

 

They can be Animals ,Fatigue ,Hijacking etc .

 

  • Once  they select the disable button  achieved by Setting the Display Mode property of the field in my example Animal to :If(Checkbox 2. Value=true,Display Mode. Disabled,Display-mode. Edit)  which grays out that field.
  • This Accident group type  : Animal is used by users on a form  called  vehicle incidents and its is a drop down selection . 
    •  I would like once the Admin user has ticked the check box  for  this item to be greyed out it cannot be edited ,
    • On the form drop down it must  become greyed out  so that user can no longer use it  when they create new incidents 
    •  For previous incidents that it was used ,users can still enquire  the previous incidents  and see that field animal  because there reports that users pull for these incidents .

How can I achieve this ?, I have also added the attachments to show my screens . 

 

 

Accident Group Formula to disable the record on the admin screen.PNG

Disbaled item.PNG

Select the disabled and is now greyed out and can be edited 

 

 

Not greyed on the form and can be used 

Accident not greyed out on the dropdown.PNG

10 REPLIES 10

Hi @rmaziwis ,

Sorry for the lateness of this reply.

Firstly, I assume this code is on the OnChange property of the drop-down - also the issue here (now that I have my mind around what you are trying to do) is not the checkbox - it is the field name in the table that the checkbox sets to true. I will call it NotShow in the below - just substitute your field name for this.

I also noticed you have said the field name in the drop-down is Accident Name - I may need a bit more clarification on this, however try this code.

If(
   !isBlank(
      LookUp(
         '[rp].[Accident group]',
         Accidentgroup = DataCardValue46.Selected.'Accident Name' && NotShow.Value = true,
         AccidentGroup
      )
   ),
   Notify("You cannot select this item";
   NotificationType.Error);
   Reset(DataCardValue46)
)

 

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.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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