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

If an item from a drop down List has been used on a record saved and submitted on a form its must not allow user to delete

Hi  All

 

I have scenario whereby on a form the users capture, we have specific dropdown values  they select .Once a form is saved & submitted and incident record is created  those drop down values used must not be edited or deleted .

 

These dropdown records are maintained through an admin app and  like in this example we will use accident group drop down  ,(the admin user  must be able to edit /delete coz they maintain this ) in this scenario they want to delete the  accident group type Fatigue but it has been used on Incident number 1 .

 

System  should not allow that admin user to delete but let him /her aware that it is in use in  an incident record  and cannot be deleted .

 

Currently I did not cater for that and might be an issue for reporting purposes  so how  can I achieve this ?

 

This is a formula I have on the delete icon in the admin section Select(Parent);Remove('[rp].[Injury classification]',ThisItem)

below are screen shots to give clarity ,but at the moment it  is allowing them to delete regardless .

 

Admin accident group.PNGAdmin user can see the delete button and currently it will allow user to delete.PNGFatigue has been used incident 1  on a form and must not be deleted.PNG

 

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @rmaziwis ,

Do you want : if the fields have value, the fields value will not can be changed and deleted?

I suggest you set drop down's DisplayMode.

Set the drop down's DisplayMode:

If( IsBlank(ThisItem.fieldname),DisplayMode.Edit,DisplayMode.View)

Then if you submitted the fields' value before, you can not edit or delete it later.

112815.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi
Iam going to use incident number 4 I already used the site Aeroton as the site on that specific incident it has been saved and submitted  .
The admin user has a different screen they go to edit , create  and delete the sites that a user does not see .
So Iam saying the Admin user must not be able to delete the site Aeroton or change it to Aeroton 1 because user ABC used it already .Your formula is just making the drop down field not editable after a record is saved .
But from the admin section on the  form where they maintain the sites it has allowed me to delete it which is what I am asking how do I prevent the admin from deleting Aero ton  since it is a site value selected for incident number 4 ?

 

This is the admin screen where the Admin maintains sites from not on the create form where the drop down isAdmin section.PNGThis is the value used on icident number 4.PNGAeroton is deleted and is no longer available from the drop down.PNGAeroton is deleted from drop down.PNG

 

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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (65,974)