cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Harley525
Helper III
Helper III

Patch and Collect

Hello,

 

I made a formule i think it is oke but it doesen't at up.

Can some one help me out. 

 

Patch and Collect.png

9 REPLIES 9
BCLS776
Super User
Super User

A few things I'll point out.

 

First, your Patch() appears to have an error: a control name (highlighted pink) is being used where a column name for your data source should be. You should be referencing the column name you want Dmschrijving.Text stored.

 

BCLS776_0-1631885195376.png

 

Second, you have a Collect statement for the same data source immediately after (highlighted in green) that appears to be adding empty strings to the data source -- do you really need to do that? If so, what's the purpose?

 

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
StalinPonnusamy
Super User
Super User

Hi @Harley525 

 

Please clarify what exactly you are trying to do.

 

The below command gets the response from the Patch command. This includes all data you patched, ID, and Link to Item

 

ClearCollect(ColName, Patch())

 

 

And Collection is Table. So to get ID or Link we need to use First like

First(ColName).ID OR First(ColName).'Link to item'

What i am trying to make is that i want to store the line into share point and after that i want a empty line for the next line. i have seen this in a video from shane young info path.

i want to do the same.

What i am trying to make is that i want to store the line into share point and after that i want a empty line for the next line. i have seen this in a video from shane young info path.

i want to do the same.

StalinPonnusamy
Super User
Super User

Hi @Harley525

 

I assume you have Edit Form and using the Patch command to save data. To refresh the form,

 

Set the OnSuccess property of the EditForm to

Refresh(DataSource);
NewForm(EditFormName);

 

My Sample

StalinPonnusamy_0-1632228543933.png

 

I am using a newform for this 

StalinPonnusamy
Super User
Super User

OK. Select the form and set the OnSuccess property of the form to

NewForm(EditFormName);

 

This clears the data and should be ready for another item to enter.

Sorry i forgot it is gallery in a form.

 

Harley525_0-1632239582274.png

 

WarrenBelz
Super User
Super User

Hi @Harley525 ;

Your syntax (I have assume European here) needs to be something like this - I am also assuming Omschrijving is the name of your Text Box (if not use that control's name)

Patch(
   'Aanvraag Artikelen';
   {ID:ThisItem.ID}; 
   {Artikelnr:Omschrijving.Text}
);;
Collect(
   'Aanvraag Artikelen';
   {LineItem: ""};
   {LineItem: ""};
   {LineItem: ""}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,335)