web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / patch on dropdown and ...
Power Apps
Unanswered

patch on dropdown and toggle - Getting error - runtime

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

As I am learning powerapps,I have a question.

So I have added 2 more columns in the sp list:1) privacy settings - public or private (choice column) and external sharing: yes/no. And on the powerapp- privacy settings have a dropdown control and external sharing has a toggle control. And as I did not use forms, I am using patch function on the submit button to save data on the sharepoint list. But on doing so, I get an error(attached screenshot).On checking the app checker symbol - error shows on runtime and not formula. what does that mean?

The formula on submit button is:Patch(Requests,
{Title:TextInputSiteName.Text,'Site Type':Radio.Selected,Alias:TextInputAlias.Text ,Name:TextInputName.Text, Email:TextInputEmail.Text, Purpose:TextInputSitePurpose.Text,'Privacy Settings':Dropdown2.Selected,'External Sharing':Toggle1.Value, Owner:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Department: "",
Claims: "i:0#.f|membership|" & Lower(ComboBox1.Selected.DisplayName),
DisplayName:ComboBox1.Selected.DisplayName,
Email: ComboBox1.Selected.Mail,
JobTitle: "",
Picture: ""
}
});

 

 

Everything was working fine until I added the privacy setting and external sharing.

 

Any help on this, would be much appreciated. Thanks

MicrosoftTeams-image (4).png
Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    The issue is your patch, you have not told it what record to patch. Try this:

    Patch(Requests, Defaults(Requests),
    {Title:TextInputSiteName.Text,'Site Type':Radio.Selected,Alias:TextInputAlias.Text ,Name:TextInputName.Text, Email:TextInputEmail.Text, Purpose:TextInputSitePurpose.Text,'Privacy Settings':Dropdown2.Selected,'External Sharing':Toggle1.Value, Owner:{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Department: "",
    Claims: "i:0#.f|membership|" & Lower(ComboBox1.Selected.DisplayName),
    DisplayName:ComboBox1.Selected.DisplayName,
    Email: ComboBox1.Selected.Mail,
    JobTitle: "",
    Picture: ""
    }
    });

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @phipps0218 I am still getting the error inspite of trying the above.

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Can you run Network via F12 and show me the details of the error please?

  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hello,

    Can you try to add .value after Radio.Selected and Dropdown2.Selected so that you specify only a string value and not the hole object.

     

    Best regards,

    Alaa

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @phipps0218 How do I do this? Sorry have never done this before, I am new to it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @alaabitar I have tried that and it still gives me error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard