cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
patty789
Helper V
Helper V

How can i check if you submitted a request, but then if you cancel the request to allow user to submit a new one

Hello,

 

I have a question: How to check in powerapps if you submitted a request to a SharePoint list, and if user cancels the request to be able to submit a new one. I have a formula that checks if the creator submitted a request, but when user updates the record to cancel i want user to be able to submit a new request. Can this be possible? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @patty789 ,

 

Try this:

If(!IsEmpty(Filter('Request', CreatorName.DisplayName = varUser.FullName && RequestStatus.Value = "Submitted" && Isblnak(UpdateType.Value))), 
Navigate(PersonalRequestScreen, ScreenTransition.Fade), 
!IsEmpty(Filter('Request', UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true}))


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more. 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

8 REPLIES 8
KrishnaV
Super User III
Super User III

Hi @patty789 ,

 

Add a new column in SharePoint list as request Status (choice column "Yet-To-Start","In-Progress","Completed","Cancelled"). Give a screen to user and list all the his/her tickets along with a cancel button. If user click on cancel button update the status as "Cancelled". While clicking on new ticket request ensure that there are no open tickets in SP List.

 

Let me know if you need filter formulas, I can provide you in detail.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV Thank you for your response i have this formula on a submit button yet it does not work and currently i have a record created by me and when i go to my personal view on the app i click edit then i have a drop down to select update request or cancel and i select cancel, but i want to go back and select a new request my formula does not work.  

 

If(!IsEmpty(Filter('Request', CreatorName = varUser.FullName && RequestStatus.Value = "Submitted")), Navigate(PersonalRequestScreen, ScreenTransition.Fade), !IsEmpty(Filter('Request', UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true}))

Hi @patty789 ,

 

Try this:

If(!IsEmpty(Filter('Request', CreatorName.DisplayName = varUser.FullName && RequestStatus.Value = "Submitted")), 
Navigate(PersonalRequestScreen, ScreenTransition.Fade), 
!IsEmpty(Filter('Request', UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true}))

Note:  I am assuming CreatorName is a people picker field in SharePoint List.

 

I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV The CreatorName column in SharePoint list is a single text column. 

Hi @patty789 ,

 

Ok try this,

If(IsEmpty(Filter('Request', CreatorName = varUser.FullName && RequestStatus.Value = "Submitted")), 
Navigate(PersonalRequestScreen, ScreenTransition.Fade), 
!IsEmpty(Filter('Request', UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true}))

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV That worked yet, the If statement now is not checking if i already submitted a request and should take me to my personal view. 

Hi @patty789 ,

 

Try this:

If(!IsEmpty(Filter('Request', CreatorName = varUser.FullName && RequestStatus.Value = "Submitted")), // This takes the user to PersonalRequest Screen if there are any submitted requested on the logged in user name
Navigate(PersonalRequestScreen, ScreenTransition.Fade), 
!IsEmpty(Filter('Request',CreatorName = varUser.FullName && UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true})) // This will set the variable to True if there are any cancelled request in the form with the logged in user.

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Hi @patty789 ,

 

Try this:

If(!IsEmpty(Filter('Request', CreatorName.DisplayName = varUser.FullName && RequestStatus.Value = "Submitted" && Isblnak(UpdateType.Value))), 
Navigate(PersonalRequestScreen, ScreenTransition.Fade), 
!IsEmpty(Filter('Request', UpdateType.Value = "Cancel Request")), UpdateContext({showPopup:true}))


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more. 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

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 (46,528)