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

Getting TextBox Information to save to SharePoint List

I have my form fully setup. It works just fine, except all the text boxes I have. I added a dataCard which has 2 labels and 1 Text Box on it. When you click  a Yes/No toggle it will unhide the  DataCard. Then you have 2 labels with information and a text box to add additional information. When you add additional information and then save the form to the SharePoint LIst. the form uploads correctly,  However, the information you typed into the Additional information textbox is gone. it will just have the HintText there now that just says Additional Information. How do I get the custom text the user input into the Textbox to stay? 

 

I am also have issues with another text box. It is an Additional Notes text box that will accept the user input and save it. however it adds code to the text box such as:
<div class="ExternalClass1A23A329F5644CF4829D744661618C38">Hello</div>

 

In this case, the user only typed "Hello", but when you pull up the form to look at it, all the rest appears with it in the TextBox.

 

Any help is greatly Appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Agerde 

Let me start with the last issue you are having first - you most likely have the column in your list set to enhanced/rich text.  If you do not need it to be anything other than Plain text, then change your column definition to Plain Text.  If you do need enhanced/rich text, then you will need to replace the TextInput control with an HTML control.

 

Next issue - what is the column name that you are storing your "Additional Information" into?  You will want to have the DefaultText property of your TextInput control set to the value of that column - ThisItem.yourColumnName

It sounds like you already have the saving of that information to the list nailed down.

 

I hope this is helpful and if you still have issues, just post back.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@Agerde 

Let me start with the last issue you are having first - you most likely have the column in your list set to enhanced/rich text.  If you do not need it to be anything other than Plain text, then change your column definition to Plain Text.  If you do need enhanced/rich text, then you will need to replace the TextInput control with an HTML control.

 

Next issue - what is the column name that you are storing your "Additional Information" into?  You will want to have the DefaultText property of your TextInput control set to the value of that column - ThisItem.yourColumnName

It sounds like you already have the saving of that information to the list nailed down.

 

I hope this is helpful and if you still have issues, just post back.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes 

 

Now that you mention it... I don't think I have column names in SharePoint to save the data too..... I will have to go through and add columns and then add ThisItem.ColumnName to each textbox now. 

 

I also checked the second issue I was having with your response. I did indeed have it said to RIch Text. I set it to Plain and it resolved. 

 

I think I was so focused my issues were strictly in PowerApps I didn't think to look at my SharePoint side of things. 

 

Thank you!

@RandyHayes 

 

I updated my first TextBox's default value to say "ThisItem.ColumnName" Which I created as FOM AddInfo. when I submit the form and then go back into it via sharepoint, the Column shows as blank in the library view of the form and the form itself will have the initial text box as blank again. Am I possibly missing something else? am I going to need to delete each textbox and re-add them to get them to link to the column name?

@Agerde 

When you have a DataCard that is connected to a column in your list, there are a few properties of that card that are important:

1) DataField- This will be the name of your column as it is found in your datasource.

2) Default - This is the default value for that column, normally ThisItem.columnName 

3) Update - This is the information that gets written to the record on Submit.  This is dependent on the type of column.  For example a Text column would normally have DataCardValuex.Text  

 

These are the key properties that make a datacard work with the form properly.  

My question is, have you added the columns to your Form with the "Edit Fields" method and selected the column/field from your datasource?  This will automatically have everything you need connected and ready to go.  If you added custom datacards, then you don't get the above properties and things are a bit different.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

They're all custom cards. 

 

So I am thinking I will need to create a new column in sharepoint for each textbox I need linked and then link the textbox or DataCard to the respective columns. 

Hi Agerde,
Hope you are doing well !

I am facing the similar issue as yours. Just wanted to check if you were able to then link the new column in SharePoint to the textbox in power apps ? If yes, could you please let me know how did you do it ?

@RandyHayes 

Could you please let me know if it is possible to connect the newly created columns in SharePoint to the textbox in power apps form ?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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