cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClipperSun
Advocate I
Advocate I

Edit form for status 'Draft' and 'Rejected'

Context :

I have a gallery called 'Select_Assessment' and a button called 'Set Obectives' and an Edit form 'SubmitNewObjectives' on 'Edit_Objectives' screen connected to Datasource (SP List) = 'Objective Setting'.

 

'Status' is a choice column in SP List 'Objective Setting' = 'Draft' , 'Awaiting approval' , 'Approved' , 'Rejected'.

 

Currently, 'Set Objectives' button, Onselect = Navigate(Edit_Objectives,ScreenTransition.Fade);EditForm(SubmitNewObjectives)

 

SubmitNewObjectives form -  Item = Defaults('Objective Setting'). This opens a blank form when 'Set Objectives' button is clicked.

 

I want to do the following:

 

If 'Select_Assessment' gallery is empty then SubmitNewObjectives form -  Item = Defaults('Objective Setting')

or

If 'Select_Assesment' gallery selected item Status <> 'Draft' or 'Rejected' then SubmitNewObjectives form -  Item = Defaults('Objective Setting')

or

If 'Select_Assesment' gallery selected item Status = 'Draft' or 'Rejected' then SubmitNewObjectives form -  Item = Select_Assesment gallery.Selected

 

Idea is if the status of the item is 'Draft'  or 'Rejected' then the user can continue editing where they left earlier or make changes to existing form. If any other status they get an empty form to create a new record.

 

Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
happyume
Solution Sage
Solution Sage

You can get status value using Select_Assesment.Selected.Status.Value 

 

If(
Select_Assesment.Selected.Status.Value = "Draft" || Select_Assesment.Selected.Status.Value = "Rejected", 
Select_Assesment.Selected,
Defaults('Objective Setting')
)

 

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.

View solution in original post

2 REPLIES 2
happyume
Solution Sage
Solution Sage

You can get status value using Select_Assesment.Selected.Status.Value 

 

If(
Select_Assesment.Selected.Status.Value = "Draft" || Select_Assesment.Selected.Status.Value = "Rejected", 
Select_Assesment.Selected,
Defaults('Objective Setting')
)

 

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.

View solution in original post

Thank you. This worked.🙂

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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