cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AS_kls
Helper I
Helper I

Patch? Two rows in sp-list

Hello,

 

I want to create two rows in a SharePoint list with an input in a form.

 

So I enter the following in the form:

- Name1

- Name2

- Company

 

In the SharePoint list I want two rows:

- Name1 Company

-Name2 Company

 

I also want the second row only if Name2 is not empty.

 

How can I connect this (with If and Patch)?

 

if(....;

patch(...),,

patch(...),,

... does not work... How do I get the two patch commands in a row so that they both go through (forall does not work because I have the condition that must also be fulfilled...)?

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Community Champion
Community Champion

@AS_kls Try this,

Patch(yourDataSource, recordToPatch, {columns to patch});

If(!IsBlank(Name2Textinput.Text),Patch(yourDataSource, recordToPatch, {columns to patch}));

View solution in original post

3 REPLIES 3
CNT
Community Champion
Community Champion

@AS_kls Try this,

Patch(yourDataSource, recordToPatch, {columns to patch});

If(!IsBlank(Name2Textinput.Text),Patch(yourDataSource, recordToPatch, {columns to patch}));

View solution in original post

AS_kls
Helper I
Helper I

yes, that works.
But what can i do if i have five names?
And also want a line where all are included (separated by comma, so depending on how many names are, then no comma too much, if 3 names, all three separated by comma and with five names all 5 separated by come)?

 

Thanks!

CNT
Community Champion
Community Champion

@AS_kls It would be good if you post new questions as a separate post for the benefit of others. Thanks.

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,154)