cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Form application in PowerApps sends 2 lines in SharePoint

Hello,

 

I've used the Patch function to send information from my application to my SharePoint list. This column has been set as 'Multiple lines of Text' in the SharePoint list by the way. But whenver I try to fill the application form it does send a line of text of what ever I typed in but it adds an extra line with no information.

 

Double lines.PNG

 

 

 

 

SharePoint settings.PNG

When I go to the settings of the SharePoint list and set the column as "Required field" it'll only sends one list of what I ever typed in the application form.. which is good but now I get an error saying:

 

Error.PNG

 

 

Message: title is required.

 

Does anyone know why this happen? All help will be appreciated.

9 REPLIES 9
Highlighted
Super User
Super User

Re: Form application in PowerApps sends 2 lines in SharePoint

What does the properties of the text control in PowerApps look like and what does the Patch() statement look like?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Helper II
Helper II

Re: Form application in PowerApps sends 2 lines in SharePoint

This is what the OnSelect button looks like:

SubmitForm(Form1) ;Set(Condoleance,DataCardValue4) ;Patch([@Condoleanceregister],Defaults([@Condoleanceregister]),{Condoleancebericht: DataCardValue4.Text});If(IsBlank(Condoleance), NoChange);Set(Condoleance,DataCardValue4) ;Patch([@Condoleanceregister],Defaults([@Condoleanceregister]),{Condoleancebericht: DataCardValue4.Text});If(IsBlank(Condoleance), NoChange)
Highlighted
Helper II
Helper II

Re: Form application in PowerApps sends 2 lines in SharePoint

Current state of filling the application to send to the SharePoint list:

Duplicated lines.PNG

 

Current erorr: Title: Required field

The strangest thing is that I do not have a column called Title anymore and I haven't changed any of the column to Must have a value in the advanced settings of SharePoint.

Highlighted
Super User
Super User

Re: Form application in PowerApps sends 2 lines in SharePoint

Is it possible that the Title column was renamed to Condoleanceregister?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Form application in PowerApps sends 2 lines in SharePoint

Hi @Fouad ,

Have you renamed the Title column into "Condoleancebericht" within your SP List?

 

Based on the issue that you mentioned, I suppose that you have renamed the Title column into "Condoleancebericht" within your SP List, is it true?

 

If you have renamed Title column into "Condoleancebericht" within your SP List, please consider modify your formula as below:

SubmitForm(Form1) ;
Set(Condoleance,DataCardValue4) ;
Patch(
[@Condoleanceregister],
Defaults([@Condoleanceregister]),
{
Title: DataCardValue4.Text /* <-- Change your formula here */
}
); If(IsBlank(Condoleance), NoChange);
...

Please consider take a try with above solution, then check if the issue is solved.

 

If the issue still exists, please consider re-create a new SP List, and do not rename the Title column in your SP list, then custom a form via PowerApps based on the new created SP List, and try your form app again, check if the issue is fixed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Form application in PowerApps sends 2 lines in SharePoint

@v-xida-msft 

 

Hello.

 

Changing the formula from CondoleanceBericht to Title indeed worked but it hasn't fixed my problem. I still get to see automatically duplicated lines in my SP list.

 

I've made a new list and I created a new column in this list to set up a new Form. I have selected Require that this column needs information to No for Title as this is gonna be my Title and so I won't have anything to type in for this column. I created a new column called: CondoleanceBericht. In my PowerApp I've refreshed the Data Sources and added the new list as well with new Form DataCards. 

 

The issue still exists, I still get automatically duplicated lines sent to my SP list.

 

This is what my Patch function looks like now though;

SubmitForm(Form1) ;Set(Condoleance,DataCardValue4) ;Patch(CondoleanceRegister,Defaults(CondoleanceRegister),{CondoleanceBericht: DataCardValue4.Text});If(IsBlank(Condoleance), NoChange)
Highlighted
Community Support
Community Support

Re: Form application in PowerApps sends 2 lines in SharePoint

Hi @Fouad ,

Does the Form1 also connect to your CondoleanceRegister list?

 

If the Form1 is alsp connected to your CondoleanceRegister list, I think there is something wrong with the formula you provided.

 

The SubmitForm() function would save a new record into your SP list, the Patch function would also save a new record into your SP list. The SubmitForm function and Patch function would execute repeated "New" operation to your SP List.

Please modify your formula as below:

Set(Condoleance,DataCardValue4);
Patch( /* <-- Just use Patch function to submit record without using SubmitForm function */
CondoleanceRegister,
Defaults(CondoleanceRegister),
{
CondoleanceBericht: DataCardValue4.Text
}
);
If(IsBlank(Condoleance), NoChange)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Form application in PowerApps sends 2 lines in SharePoint

This works I now get my form sent to my list once, however now it doesn't ResetForm and Navigate(Screen2); OnSucces in my Form. It also doesn't givce me an error message when the field is required.

OnSucces.PNGCondoleance.PNG

Highlighted
Super User
Super User

Re: Form application in PowerApps sends 2 lines in SharePoint

Are you still using the submitform()? The OnSuccess and Required Field error message is tied to how the form saves data, so if you are using patch() to submit the record and not submitform() those actions won't be triggered.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,793)