cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GinoC7
Frequent Visitor

Sending text inputs and radios from a component to a sharepoint list

Hey guys, I'm having trouble with sending text inputs and radios to a sharepoint list. Currently I have an app which includes a component I've created. The component is a card with 9 questions consisting of text inputs, radios, and ratings. For all of the questions I've created 9 Output properties. The problem I'm having is sending all of this information to a Sharepoint list.

 

In addition, at the end of my component I have a Submit button, I would like all of the inputs to be submitted to a Sharepoint list. How would I got about doing this? I can't seem to find any information related to my problem.

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Re: Sending text inputs and radios from a component to a sharepoint list

Hi @GinoC7 :

Based on your screenshot, I found that you put the button inside the component.

I am afraid that it is not possible to update your data source by doing this.

I suggest that you add buttons separately on the screen.

Best Regards,

Bof

View solution in original post

6 REPLIES 6
WarrenBelz Community Champion
Community Champion

Re: Sending text inputs and radios from a component to a sharepoint list

Hi @GinoC7 ,'

You can do this with a Patch statement - you will have to change the field, control and List names below to yours.

Patch(
  YourSharePointList,
  Defaults(YourSharePointList),
  {
     FirstName: FirstNameTextBox.Text,
     LastName: LastNameTextBox.Text,
     EmailAddress: EmailTextBox.Text
   }
)

 

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.

Microsoft
Microsoft

Re: Sending text inputs and radios from a component to a sharepoint list

HI @ GinoC7:

Can you tell me:

Do you want to insert a new record that related to the input in the component into the SharePoint list?

What is the data structure of your list? What is the data type of the fields?

I assumed these fields are all Text type.

Ive made a test for your reference:

Step1:add a new custom property(CustomProperty1) and set its property to(you can follow the steps I marked) :

 

{
Cloumnname1:textinput1.Text                            /* Cloumnname1 is the column name in your SharePoint list*/
Cloumnname2:textinput2.Text
Cloumnname3:textinput3.Text
Cloumnname4:redio4.Selected.Value
……
CloumnnameX:ratingX.Value
……
Cloumnname9: redio9.Selected.Value
}

 

 

111.jpg

 

Step2:set the submit buttons property to:

Collect(SharePointList, Component1_1.CustomProperty1)  /* Component1_1 is the components name */

I think this link will help you a lot(focus on Custom properties”) :

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-component

 

Best Regards,

Bof

GinoC7
Frequent Visitor

Re: Sending text inputs and radios from a component to a sharepoint list

Hey man,

 

Appreciate the feedback, the submit button is able to make a collection no problem. However, it won't edit an existing Sharepoint list I've created.

 

The steps I followed to do this was, import a connection from my Sharepoint site, by adding a page named '30DayCheckInList'. I then used the submit button, onSelect function as so, Collect('30DayCheckInList', '30 Day Component_1'. '30DayItems').

 

But with no luck it won't transfer the collection to the Sharepoint page.

 

@v-bofeng-msft 

Microsoft
Microsoft

Re: Sending text inputs and radios from a component to a sharepoint list

HI @GinoC7 :

Could you tell me:

Does '30 Day Component_1'. '30DayItems''s structure match '30DayCheckInList''s?

Could you show them to me?screenshots are better.

If you can't wait, I suggest you try the Patch function:

Patch('30DayCheckInList', Defults('30DayCheckInList'),'30 Day Component_1'. '30DayItems')

or

Patch('30DayCheckInList', Defults('30DayCheckInList'),{column1:'30 Day Component_1'. '30DayItems'.column1,column2:'30 Day Component_1'. '30DayItems'.column2……})

Best Regards,

Bof

GinoC7
Frequent Visitor

Re: Sending text inputs and radios from a component to a sharepoint list

Hello Bof,

 

Here's the screenshots of the Collections and Sharepoint list. If I change the collection to a different name it creates its own collection. But if I use the Sharepoint name, it doesn't do anything, such as add to the list. The Sharepoint columns are all set to type single-line text, maybe that could be the problem?

 

Screen Shot 2020-04-03 at 9.14.44 AM.pngScreen Shot 2020-04-03 at 9.15.45 AM.png

 

- Gino

 

@v-bofeng-msft 

Microsoft
Microsoft

Re: Sending text inputs and radios from a component to a sharepoint list

Hi @GinoC7 :

Based on your screenshot, I found that you put the button inside the component.

I am afraid that it is not possible to update your data source by doing this.

I suggest that you add buttons separately on the screen.

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,361)