cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SumanthDundi7
Level: Powered On

Unable to View or Edit selected item after submitting an item using PowerApps to SharePoint List

I have created a PowerApp with 3 Forms. 1st Form has a choice column. Based on what user selected in the 1st Form, either 2nd Form or 3rd Form will be navigated. 

Lets say on the first form I have Choice Column with values X & Y. If user selects Value X then it will navigate to form that is created for X Type. If user selects Value Y then it will navigate to form that is created for Y Type.

 

After submitting, I want to view directly the form of X Type if the choice selected is X or else I want to view directly the form of Y Type if the choice selected is Y.

How can I achieve this in PowerApps? Please help. 

4 REPLIES 4
Power Apps Staff Mr-Dang-MSFT
Power Apps Staff

Re: Unable to View or Edit selected item after submitting an item using PowerApps to SharePoint List

My understanding: 

  • You have want the first form to navigate to a different screen based on what is selected: Choice X or Choice Y.
  • I'm going to assume you have a button, Button1, that will perform the navigation once you're done filling out Form1.

 

Lots of ways you can do this. The shortest method may be a Switch() statement.

You can set Button1.OnSelect to:

Switch(
    Dropdown1.Selected.Value,
    X,Screen2,
    Y,Screen3
)

I'm not sure what kind of control you're using for the choices, so you'll need to change that to your needs. 

 

I'm also not sure what kind of data types X and Y are. I'm assuming they are text in this scenario. You'll need to match their type with what's picked in the dropdown/combobox control you're using.

SumanthDundi7
Level: Powered On

Re: Unable to View or Edit selected item after submitting an item using PowerApps to SharePoint List

Mr.Dang, Actually I was able to accomplish navigating/swithcing between screens and submit the form based on choice selected.

 

But here is my actual blocker:

After submitting, I want to view directly the form of X Type (if the choice selected is X) or else I want to view directly the form of Y Type(if the choice selected is Y).

(Something that needs to formulated in OnView property?!)

Community Support Team
Community Support Team

Re: Unable to View or Edit selected item after submitting an item using PowerApps to SharePoint List

Hi @SumanthDundi7 ,

Could you please share a screenshot about your app's configuration?
Do you want to view the X Type form (or Y Type form) directly after you submit your X Type form (or Y type form)?

Further, do you custom a form in your SP List using PowerApps?

 

Based on the scenario that you mentioned, I suppose that you custom a form in your SP list using PowerApps, is it true?

 

I have made a test on my side, please consider take a try with the following workaround:

1. Remove the RequestHide() formula from the OnSuccess property of your first Edit form.

2. Set the OnSuccess property of the X Type form to following:

Set(CurrentXFormData, XTypeForm.LastSubmit);
Navigate(XTypeScreen); /* <-- XTypeScreen contains the XTypeForm */
ViewForm(XTypeForm)

set the Item property of the X Type form to following:

If(
   !IsBlank(CurrentXFormData),
CurrentXFormData )

3. Set the OnSuccess property of the Y Type form to following:

Set(CurrentYFormData, YTypeForm.LastSubmit);
Navigate(YTypeScreen); /* <-- YTypeScreen contains the YTypeForm */
ViewForm(YTypeForm)

set the Item property of the Y Type form to following:

If(
   !IsBlank(CurrentYFormData),
CurrentYFormData )

 

4. Set the OnCancel property of the SharePointIntegration control to following:

ResetForm(FirstForm);
ResetForm(XTypeForm);
ResetForm(YTypeForm);
RequestHide(); /* <-- hiden the custom form */

5. Set the OnNew property of the SharePointIntegration control to following:

NewForm(FirstForm);NewForm(XTypeForm);NewForm(YTypeForm);
Set(CurrentXFormData, Blank())
Set(CurrentYFormData, Blank())

6. Set the OnSave property of the SharePointIntegration control to following:

If(
    ChoiceFiledDropdownBox.Selected.Value = "X",
    SubmitForm(XTypeForm),
    ChoiceFiledDropdownBox.Selected.Value = "Y",
     SubmitForm(YTypeForm)
)

Please take a try with above solution, then check if the issue is solved.

Note: I assume that you use SubmitForm function to submit your form data.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SumanthDundi7
Level: Powered On

Re: Unable to View or Edit selected item after submitting an item using PowerApps to SharePoint List

Hi @v-xida-msft,

 

Sorry if it is understood that way. But thanks alot for your reply. 

 

Here is what I am looking for:

" I want to view the X type form from the SharePoint list directly if the choice selected is X related type." Likewise, for Y type form. But not right after submitting! 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,757)