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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (63,129)