cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Patching Forms to SharePoint - dropdown fields not writing back to SharePoint List

  • Outcomes
    • Field Names: Title
  • Courses
    • Field Names: CourseName  and Outcome (multi-select lookup field, data source is Outcomes SharePoint List’s Title field)
  • Assessment Form
    • Field Names: OutcomeChoice (lookup field, data source is Outcomes), Course (lookup field, data source is Courses), and several choice fields where binding is connected to Formative Assessment Feedback Methods Listà Title field

I have created the InfoPath form. The dropdown fields contain the only choice from the choice field(None) and the rest of the lookup fields from Formative Assessment Feedback Methods List (below).

 

columneditor.jpg

 

Dropdown22.jpg

 

In PowerApps, however, those dropdowns only contain the choice NONE, which comes from the choice field. The choices from the Formative Assessment Feedback Methods List arent there.

 

PA1.jpg

 

choices.jpg

 

Also, in my first Form in PowerApps, it contains the Outcomes and Courses lookup mentioned earlier in the email. In InfoPath, when you select an Outcome in the dropdown, the Courses dropdown will display all courses that have that outcome (an Outcome can have many courses).

 

infopath.jpg

 

I was able to mimic the same functionality in PowerApps, but I had to remove the course dropdown field from the card and add a new dropdown.

 

However, when I use my Patch function Patch('Assessment Form',Defaults('Assessment Form'), OutcomeCourseForm.Updates, FormativeForm.Updates,SummativeForm.Updates);Notify("SUCCESS!",NotificationType.Success);Navigate(ThankYou,ScreenTransition.Fade) , my course dropdown field doesn’t write back to SharePoint and my other dropdowns in question only provide the choice None even if I select another option.

 

 

FormResults.jpg

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Patching Forms to SharePoint - dropdown fields not writing back to SharePoint List

Hi @Anonymous,

Do you remove the Course Data card from your first form, and add a new Dropdown?

Could you please share more details about the Items property of the Feddback Method #1 Dropdown?

I fould that you have post same issue within the forum, please check my response within the following threads:

https://powerusers.microsoft.com/t5/General-Discussion/Casading-dropdown-with-2-SharePoint-Lists/m-p/169923/highlight/false#M56863

https://powerusers.microsoft.com/t5/General-Discussion/Cascading-Dropdowns-within-a-PowerApps-EDIT-form-using/m-p/170044#M56899

Based on the Patch formula that you provided, I think there is something wrong with it.

For your first question -- my course dropdown field doesn’t write back to SharePoint. If you remove the Original Course Data card from your first form, and add a new Dropdown, the new Dropdown would not be connected to the Course field in your Assessment Form list. So when you submit the OutcomeCourseForm.Updates data into your Assessment Form list using Patch function, the Course field would be empty.

Please modify your formula as below:

Patch(
    'Assessment Form',
     Defaults('Assessment Form'),
     {                               /* <-- Modify Start */
       Outcomes: {                   /* The Outcomes and Courses represents the Outcomes field and Courses field within your first form */
                  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                   Value: OutcomesDropdown.Selected.Value
                },
       Courses: {
                  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: CoursesDropdown.Selected.Id,
Value: CoursesDropdown.Selected.Value } }, /* <-- Modify End */ FormativeForm.Updates, SummativeForm.Updates ); Notify("SUCCESS!",NotificationType.Success); Navigate(ThankYou,ScreenTransition.Fade)

then check if the issue is solved.

 

For your second question -- my other dropdowns in question only provide the choice None even if I select another option.

Please modify your formula as below:

Patch(
    'Assessment Form',
     Defaults('Assessment Form'),
     {                               
       Outcomes: {                   /* The Outcomes and Courses represents the Outcomes field and Courses field within your first form */
                  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                   Value: OutcomesDropdown.Selected.Value
                },
       Courses: {
                  '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                   Id: CoursesDropdown.Selected.Id,
                   Value: CoursesDropdown.Selected.Value
               }
     },                              
     {                 /* <--  Modify here start */
       Title: DataCardValue1.Text,
       Formative_x0020_Assessment_x0020_Tool_x0020_#1: FormativeAssessmentTool#1Dropdown.Selected.Value,
       Feedback_x0020_Methond_x0020_#1: FeedbackMethond#1.Selected.Value,
       ...
     },   /* <-- Modify here end */
     SummativeForm.Updates
);    
Notify("SUCCESS!",NotificationType.Success);
Navigate(ThankYou,ScreenTransition.Fade)

 

Best regards,

Kris

 

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,270)