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

Patch Collection makes Edit Form unavailable

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Patch Collection makes Edit Form unavailable

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

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Patch Collection makes Edit Form unavailable

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

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

AdrianMitroiu
Level: Powered On

Re: Patch Collection makes Edit Form unavailable

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.

Helpful resources

Announcements
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.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

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 (7,055)