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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,349)