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 Collection makes...
Power Apps
Answered

Patch Collection makes Edit Form unavailable

(0) ShareShare
ReportReport
Posted on by 8

Hi there,

 

I have created an app based on a SP List as a questionnaire.

Based on the user answers I marked the questionnaire as 'Completed' or 'Incompleted' using the "Patch" function to update a column in collection that is not in the SP List. 

 

 

Collect(
 QuestionnairesList,
 {
 Status: "",
 ...
 }
 );
If(_condition_, 
 Patch(
 QuestionnairesList,
 First(
 Filter(
 QuestionnairesList,
 Title = AddTitleInput.Text
 )
 ),
 {Status: "Incomplet"}
 ),
 Patch(
 QuestionnairesList,
 First(
 Filter(
 QuestionnairesList,
 Title = AddTitleInput.Text
 )
 ),
 {Status: "Complet"}
 )
)

 

 

My problem is that when I Edit the questionnaire the "Item" property of the form shows the Error: "Invalid formula. Expected a value compatible with 'DataSource'."

 

I should mention that:

  • the Gallery Items is 'QuestionnairesList' collection
  • the EditForm Item is 'Questionnaires.Selected' ( Questionnares is the name of the Gallery)
  • the EditForm DataSource is 'QuestionnairesList'

 

Before I add the "Status" column in the collection, Edit form worked as it should.

 

What am I missing?

Categories:
I have the same question (0)
  • Verified answer
    v-sheyu-msft Profile Picture
    Microsoft Employee on at

    Hi @AdrianMitroiu,

    The error message is caused by that when the field property in the Edit Form doesn’t match to the structure of the DataSource.

     

    I assume that there’s a ID column in your collection

     

    You can try to set Items property of EditForm to :

    LookUp(QuestionnairesList,BrowseGallery1.Selected.ID=ID)

    Regards,

    Eason

  • AdrianMitroiu Profile Picture
    8 on at

    Thank you for your reply @v-sheyu-msft,

     

    Your solution, as far as I have tried, works. 

    Meanwhile I have created a second collection where I have stored the ID from the QuestionnairesList and the Status that it gets after my condition.

     

    However i have to agree that your solution is clearer.

     

    Thank you for your time.

    Adrian.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard