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

write to sharepoint list

Thanks to Meneghino i'm using this code: 

If( DropDown1.Selected.Value = "Prive", Value(Eind_Kilometers) - Value(Start_Kilometers))

 

 

 

The only thing is missing, it does not write to my sharepoint list. 

 

So for you guys it might be simple but for me it does not. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: write to sharepoint list

Hi the first version of the app is released, im currently working on another app so the topic may closed

View solution in original post

19 REPLIES 19
Highlighted
Community Champion
Community Champion

Re: write to sharepoint list

Hi @Nick_M

 

Writing to a SharePoint list (or any other data source) requires:

1. An event to trigger the writing (i.e. pressing a button, choosing a value in a drop down, etc. etc.)

2. Knowing whehter you create a new record, edit an existing record or even delete an existing record.

3. If edit or delete then you need to know which record

4. If new or edit, then you need the values for any fields of the record that you wish to create/modify

 

If you clarify a little more your use case in light of the above then I can help you further.  For example, do you want to write SharePoint as soon as the value of DropDown1 is changed?  Or do you want to write the value Value(Eind_Kilometers) - Value(Start_Kilometers) to another column when the general Save button is pressed?

Highlighted
Helper II
Helper II

Re: write to sharepoint list

I want to write the value Value(Eind_Kilometers) - Value(Start_Kilometers) to column Aantal_Prive_Kilomters when the general Save button is pressed

 

 

And Eind_Kilomters - Start_Kilometers only must be done when the value of the dropdownlist is Prive

Highlighted
Community Champion
Community Champion

Re: write to sharepoint list

Understood.  I assume that you are using a form, but please let me know if you are not.

 

Do you have a data card for the Aantal_Prive_Kilomters column in your form? If not, then please create one.

 

Then you should set its Default property to:

If( DropDown1.Selected.Value = "Prive", Value(Eind_Kilometers) - Value(Start_Kilometers))

Please see if this works.

 

If it does, then we can worry about preventing people from changing the value etc.

 

PS Please refer here for info:

https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/

Highlighted
Helper II
Helper II

Re: write to sharepoint list

Yes, im using a form, the code you give me i im using currently, and displays the Eind_Kilometers - Start_kilometers but not does write the result of Eind_Kilometers - Start_Kilometers to the column Aantal_Prive_Kilometers

 

 

And the datacard does have the name DataCard26

Highlighted
Community Champion
Community Champion

Re: write to sharepoint list

Do you have a data card for the Aantal_Prive_Kilomters column in your form?

Or did you simply create a text box?

 

I find forms are very complicated as soon as you try to make any customisation.

Please let me know if you are ready to try another approach, basically doing your own form.

Highlighted
Helper II
Helper II

Re: write to sharepoint list

I have a Datacard for Aantal_Prive_Kilometers called DataCard26

Highlighted
Community Champion
Community Champion

Re: write to sharepoint list

OK, understood.

As I mentioned, I don't really use forms because they are difficult to customise.

If you want we can start to build your own form from the controls.

Highlighted
Helper II
Helper II

Re: write to sharepoint list

Maybe another time.

 

Currently Auto creating an app based on my database 😉

 

Im not an app developer, so i know the very basics. 

Highlighted
Community Support
Community Support

Re: write to sharepoint list

Hi Nick_M,

 

What is your current situation?

Do you still need help regarding this topic?

For form which are auto-generated, please check the document below for more details:

Edit form and display form controls in PowerApps

For edit form, the form are built automatically based on the columns from your data source, which we could add or edit a record;

Just checking with your formula, I think the way you would like to achieve is to update some column value based on special selection, right?

Just add the if formula after the original formula of the Onselect property of the Save button, with a ";" to seperate them.

The if formula sould be in the format below:

If( DropDown1.Selected.Value = "Prive", patch(table, BaseRecord, ChangeRecord1))

Do in this way should make the update work.

Please see the function reference for more details:

Patch function in PowerApps

More:Update and Updateif Function in PowerApps

If you need any further assistance on this, please post back.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

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!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,022)