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 / Text Inputs/Patching/R...
Power Apps
Unanswered

Text Inputs/Patching/Resetting

(0) ShareShare
ReportReport
Posted on by 4

Hi 

 

I have a SharePoint integrated form and while I'm using edit forms for some of the data, I'm using text inputs that patch to my source for other parts. The issue I'm having is that creating a new form displays the values of the text inputs from my last viewed entry.

 

For example, I have a text input called AttendeesTextInput that patches perfectly fine to my data source in a column called 'Attendees'.

The default value for the text input is  SharePointIntegration.Selected.Attendees.

 

When I click new form (and I have ResetForm in it although it doesn't apply since that column is not part of the form), the text input shows that value of 'Attendees' from the last entry that I viewed.

 

I've tried messing with the reset function of the text input, which is supposed to reset it to its default value. My question is - If a New entry doesn't have values for any columns (since it's new), why is it showing the value of the last view entry. Creating a variable that resets the text input just resets it back to default of being  SharePointIntegration.Selected. Attendee, but for the last entry. 

 

Has anyone had this issue before? I don't know how a new form can referenced anything using  SharePointIntegration.Selected from the previous entry.

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    The behavior you are experiencing in your Power Apps form is likely due to the way SharePointIntegration.Selected works and how the form data is managed. When you navigate between items or open the form for a new entry, the SharePointIntegration.Selected variable retains the value of the last selected item. As a result, when you open a new form, the text input defaulting to SharePointIntegration.Selected.Attendees will show the value of the previous item's 'Attendees' column.

    To address this issue, you can modify the default value of the text input so that it behaves correctly when a new form is opened. Instead of using SharePointIntegration.Selected.Attendees as the default value, you can use the Defaults function to set the default value based on the field's data type.

    Here's how you can do it:

     

    1. Determine the data type of the 'Attendees' column in your SharePoint list. It could be Single line of text, Person, or something else.

     

    2. For Single line of text columns:

    Default: ""

     

    3. For Person columns:

    Default: { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", Claims: "", DisplayName: "", Email: "", Picture: "", Department: "" }

     

    Note: The default value for a Person column is an empty record of the SPListExpandedUser data type.

     

    By using the Defaults function with the appropriate data type, the text input will be properly reset to its default value when opening a new form, and it won't display the value from the previous entry.

    If you still encounter issues with the text input not resetting correctly, you can try using a variable to control the default value. For example:


    Default: If(IsNewForm, Defaults('Your SharePoint List'), SharePointIntegration.Selected.Attendees)


    Here, the IsNewForm function checks if the form is in "new" mode, and if it is, it sets the default value to the appropriate Defaults function for your data type. If it's not a new form, it uses SharePointIntegration.Selected.Attendees as the default value.

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 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard