Update Sharepoint list item powerapps

Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
View Only
  • Community Home
  • Discussion 3.9K
  • Library 113
  • Events 0
  • Members 23.3K

View My Drafts

Back to discussions
Expand all | Collapse all

Update a record in Powerapps, which will update record in sharepoint

Chris ClarkMay 02, 2019 12:13 PM

Hi, I'm having issues updating two specific fields, from a Form within PowerApps to update the corr...

Reza DorraniMay 06, 2019 06:17 AM

Hi @Chris Clark , Looks like the 2 fields are lookup fields wherein the data is coming from a sep...

Chris ClarkMay 07, 2019 04:45 AM

Hi Mohammad, Thanks for your reply, Can I just clarify the formula and get a better understand o...

Rob ElliottMay 07, 2019 07:16 AM

Make sure in each datacard for the column in PowerApps that you've got a text input box - in my...

Chris ClarkMay 21, 2019 05:22 AM

Hi Mohammad, I tried to use the formula you suggested but there seems to be an error but I'm ...

Warren BelzMay 22, 2019 02:03 AM

Hi Chris, The methodology Mohammed uses is correct. There is however another way of doing this...

Chris ClarkMay 22, 2019 05:13 AM

Hi Warren, Sorry, but if I'm not using the Patch function what function would i need to use? ...

Warren BelzMay 22, 2019 05:44 PM

Hi Chris, This option just involves a normal SubmitForm with the code below in the Update pro...

Chris ClarkMay 23, 2019 05:26 AM

Hi Warren, I'm having such trouble / issue with this... The Datacard for the two fields whi...

Warren BelzMay 23, 2019 06:18 PM

Hi Chris, When you say " The Datacard for the two fields which I require to be updated [Co...

Chris ClarkMay 24, 2019 04:45 AM

Hi Warren,, Yes the Items Properties for the two fields are sourcing data from a separate...

Warren BelzMay 25, 2019 04:12 AM

Hi Chris, Your model is not exactly something I have done before [I do all the sort/filte...

Chris ClarkMay 30, 2019 07:36 AM

Hi Warren, Sorry for the late response, but I've been involved in other things and just ...

Warren BelzMay 30, 2019 06:19 PM

Hi Chris, Glad you have sorted it - it was a good exercise for me revisiting some older...

Warren BelzMay 11, 2019 11:59 PM

Hi Chris, I am not sure how useful this is and without seeing the actual items property this is a ...

Chris ClarkMay 14, 2019 03:32 AM

Hi Warren, Thanks for the example you have provided. I will certainly try the solution, in the c...

Chris ClarkMay 21, 2019 04:02 AM

Hi Warren, I've tried to recreate your example but with no luck. These are the properties I have...
  • 1. Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 02, 2019 12:13 PM
    Reply Reply Privately Options Dropdown
    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 2. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Reza Dorrani
    Posted May 06, 2019 06:17 AM
    Reply Reply Privately Options Dropdown
    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793
    ------------------------------

    Original Message
    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 3. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 07, 2019 04:45 AM
    Reply Reply Privately Options Dropdown
    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 4. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Bronze Contributor
    Rob Elliott
    Posted May 07, 2019 07:16 AM
    Reply Reply Privately Options Dropdown

    Make sure in each datacard for the column in PowerApps that you've got a text input box - in my one in the image below I've changed the name to dataDesktopPC - which holds as its default value the selected item in the dropdown [eg. default = ddDesktopPC.Selected.Value]. You can hide it later. The Update for the datacard [in my example cardDesktopPC] should be set to the text input box datadesktopPC. Hope that helps.
    Rob
    Los Gallardos


    Original Message
    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 5. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 21, 2019 05:22 AM
    Reply Reply Privately Options Dropdown
    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 6. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 22, 2019 02:03 AM
    Reply Reply Privately Options Dropdown

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 7. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 22, 2019 05:13 AM
    Reply Reply Privately Options Dropdown
    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 8. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 22, 2019 05:44 PM
    Reply Reply Privately Options Dropdown
    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 9. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 23, 2019 05:26 AM
    Reply Reply Privately Options Dropdown
    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 10. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 23, 2019 06:18 PM
    Reply Reply Privately Options Dropdown
    Hi Chris,

    When you say "The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment]", do you mean the "Items" property in the drop-downs [what are they]? The data card's sources should be [and seem to be from your screenshot] the target fields to be updated - Location and Department [that is how SubmitForm works]. What you need to tell it in the Update properties is what to write to the source list.

    Patch is a "manual" [but more flexible] function generally used instead of SubmitForm. It would be technically possible to use both, however the SubmitForm would need to be first, then the form refreshed after the Patch, however this process should not be necessary for you.

    Firstly, what is the format of the target fields in SharePoint? If they are lookup fields based on the other lists, you may need the odata, but I suspect they are single lines of text, in which case you do not.

    I also assume the drop-downs "DepartmentID" and "LocationID" display the actual text you want to be updated and are also the names of these fields from the other lists.

    If all of this is the case, I am hoping that using card Update properties of: -
    DepartmentID.Selected.DepartmentID
    and
    LocationID.Selected.LocationID
    should work

    I would welcome any other Forum opinions on this as I only have experience in the methods I use.




    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 23, 2019 05:26 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 11. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 24, 2019 04:45 AM
    Reply Reply Privately Options Dropdown

    Hi Warren,,

    Yes the Items Properties for the two fields are sourcing data from a separate SP list to the one I need updating.

    Formulas are; -

    Location Field - ItemsSort[Distinct[LocationVDepartment,Title],Result]
    Department Field - Items -Distinct[Filter[LocationVDepartment,Title=LocationID.Selected.Result],Department]

    [These are the same formulas being used in the initial screen for entering data for a new visitor]

    The columns in my SP list for Location & Department were Choices. I changed them both the Single Line of Text and refreshed. Errors appeared for both fields - Expected Record Value.

    The error seems to relate to Default and DefaultSelectedItems properties. They are currently display the formulas, ThisItem.Location and ThisItem.Department respectively in both property fields.



    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 23, 2019 06:17 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    When you say "The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment]", do you mean the "Items" property in the drop-downs [what are they]? The data card's sources should be [and seem to be from your screenshot] the target fields to be updated - Location and Department [that is how SubmitForm works]. What you need to tell it in the Update properties is what to write to the source list.

    Patch is a "manual" [but more flexible] function generally used instead of SubmitForm. It would be technically possible to use both, however the SubmitForm would need to be first, then the form refreshed after the Patch, however this process should not be necessary for you.

    Firstly, what is the format of the target fields in SharePoint? If they are lookup fields based on the other lists, you may need the odata, but I suspect they are single lines of text, in which case you do not.

    I also assume the drop-downs "DepartmentID" and "LocationID" display the actual text you want to be updated and are also the names of these fields from the other lists.

    If all of this is the case, I am hoping that using card Update properties of: -
    DepartmentID.Selected.DepartmentID
    and
    LocationID.Selected.LocationID
    should work

    I would welcome any other Forum opinions on this as I only have experience in the methods I use.




    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 23, 2019 05:26 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 12. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 25, 2019 04:12 AM
    Reply Reply Privately Options Dropdown
    Hi Chris,

    Your model is not exactly something I have done before [I do all the sort/filter/distinct work in the collecting process then present the collection as a simple list for the drop-down], however to cut through all the sorts and filters, it appears to me that: -
    • You have two target fields to be updated, which are expecting a simple text value. Your cards have these fields as the source data.
    • The default of the drop-down should be Parent.Default [it needs to display the item from the main list if present] however ThisItem.Location should work.
    • I have not seen a DefaultSelectedItems property in a drop-down - it seems to relate to Combo Boxes [which I do not use presently], however some Googling suggests Parent.Default may work [don't take my advice on this - check it].
    • All of this aside, the actual field name from the other list you are displaying for selection is the one to be used for updating the target. This in both cases below appears to be "Title" [please confirm if I am correct], so: -
      • The Update properties of card Location_DataCard8 should be LocationID.Selected.Title.
      • Likewise Department_DataCard8 should be DepartmentID.Selected.Title
    Again, any further contributions from the group would be welcome.

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 24, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,,

    Yes the Items Properties for the two fields are sourcing data from a separate SP list to the one I need updating.

    Formulas are; -

    Location Field - ItemsSort[Distinct[LocationVDepartment,Title],Result]
    Department Field - Items -Distinct[Filter[LocationVDepartment,Title=LocationID.Selected.Result],Department]

    [These are the same formulas being used in the initial screen for entering data for a new visitor]

    The columns in my SP list for Location & Department were Choices. I changed them both the Single Line of Text and refreshed. Errors appeared for both fields - Expected Record Value.

    The error seems to relate to Default and DefaultSelectedItems properties. They are currently display the formulas, ThisItem.Location and ThisItem.Department respectively in both property fields.



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 23, 2019 06:17 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    When you say "The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment]", do you mean the "Items" property in the drop-downs [what are they]? The data card's sources should be [and seem to be from your screenshot] the target fields to be updated - Location and Department [that is how SubmitForm works]. What you need to tell it in the Update properties is what to write to the source list.

    Patch is a "manual" [but more flexible] function generally used instead of SubmitForm. It would be technically possible to use both, however the SubmitForm would need to be first, then the form refreshed after the Patch, however this process should not be necessary for you.

    Firstly, what is the format of the target fields in SharePoint? If they are lookup fields based on the other lists, you may need the odata, but I suspect they are single lines of text, in which case you do not.

    I also assume the drop-downs "DepartmentID" and "LocationID" display the actual text you want to be updated and are also the names of these fields from the other lists.

    If all of this is the case, I am hoping that using card Update properties of: -
    DepartmentID.Selected.DepartmentID
    and
    LocationID.Selected.LocationID
    should work

    I would welcome any other Forum opinions on this as I only have experience in the methods I use.




    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 23, 2019 05:26 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 13. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 30, 2019 07:36 AM
    Reply Reply Privately Options Dropdown
    Hi Warren,

    Sorry for the late response, but I've been involved in other things and just recently returned to this application.

    Because I was having so much trouble with updating from the Form control, I've re thought the process and now I'm using a Gallery. This seemed the most sensible way of resolving the updating of data in the SharePoint list.

    I've sampled it with some of the fields which I know now need to be available to be updated. This actually may have resolved another of my issues. Printing ID badges, fingers crossed!!

    Thanks for all your help and patience with this issue.


    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 25, 2019 04:11 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    Your model is not exactly something I have done before [I do all the sort/filter/distinct work in the collecting process then present the collection as a simple list for the drop-down], however to cut through all the sorts and filters, it appears to me that: -
    • You have two target fields to be updated, which are expecting a simple text value. Your cards have these fields as the source data.
    • The default of the drop-down should be Parent.Default [it needs to display the item from the main list if present] however ThisItem.Location should work.
    • I have not seen a DefaultSelectedItems property in a drop-down - it seems to relate to Combo Boxes [which I do not use presently], however some Googling suggests Parent.Default may work [don't take my advice on this - check it].
    • All of this aside, the actual field name from the other list you are displaying for selection is the one to be used for updating the target. This in both cases below appears to be "Title" [please confirm if I am correct], so: -
      • The Update properties of card Location_DataCard8 should be LocationID.Selected.Title.
      • Likewise Department_DataCard8 should be DepartmentID.Selected.Title
    Again, any further contributions from the group would be welcome.

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 24, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,,

    Yes the Items Properties for the two fields are sourcing data from a separate SP list to the one I need updating.

    Formulas are; -

    Location Field - ItemsSort[Distinct[LocationVDepartment,Title],Result]
    Department Field - Items -Distinct[Filter[LocationVDepartment,Title=LocationID.Selected.Result],Department]

    [These are the same formulas being used in the initial screen for entering data for a new visitor]

    The columns in my SP list for Location & Department were Choices. I changed them both the Single Line of Text and refreshed. Errors appeared for both fields - Expected Record Value.

    The error seems to relate to Default and DefaultSelectedItems properties. They are currently display the formulas, ThisItem.Location and ThisItem.Department respectively in both property fields.



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 23, 2019 06:17 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    When you say "The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment]", do you mean the "Items" property in the drop-downs [what are they]? The data card's sources should be [and seem to be from your screenshot] the target fields to be updated - Location and Department [that is how SubmitForm works]. What you need to tell it in the Update properties is what to write to the source list.

    Patch is a "manual" [but more flexible] function generally used instead of SubmitForm. It would be technically possible to use both, however the SubmitForm would need to be first, then the form refreshed after the Patch, however this process should not be necessary for you.

    Firstly, what is the format of the target fields in SharePoint? If they are lookup fields based on the other lists, you may need the odata, but I suspect they are single lines of text, in which case you do not.

    I also assume the drop-downs "DepartmentID" and "LocationID" display the actual text you want to be updated and are also the names of these fields from the other lists.

    If all of this is the case, I am hoping that using card Update properties of: -
    DepartmentID.Selected.DepartmentID
    and
    LocationID.Selected.LocationID
    should work

    I would welcome any other Forum opinions on this as I only have experience in the methods I use.




    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 23, 2019 05:26 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 14. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 30, 2019 06:19 PM
    Reply Reply Privately Options Dropdown
    Hi Chris,

    Glad you have sorted it - it was a good exercise for me revisiting some older work I had.

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 30, 2019 07:36 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry for the late response, but I've been involved in other things and just recently returned to this application.

    Because I was having so much trouble with updating from the Form control, I've re thought the process and now I'm using a Gallery. This seemed the most sensible way of resolving the updating of data in the SharePoint list.

    I've sampled it with some of the fields which I know now need to be available to be updated. This actually may have resolved another of my issues. Printing ID badges, fingers crossed!!

    Thanks for all your help and patience with this issue.


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 25, 2019 04:11 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    Your model is not exactly something I have done before [I do all the sort/filter/distinct work in the collecting process then present the collection as a simple list for the drop-down], however to cut through all the sorts and filters, it appears to me that: -
    • You have two target fields to be updated, which are expecting a simple text value. Your cards have these fields as the source data.
    • The default of the drop-down should be Parent.Default [it needs to display the item from the main list if present] however ThisItem.Location should work.
    • I have not seen a DefaultSelectedItems property in a drop-down - it seems to relate to Combo Boxes [which I do not use presently], however some Googling suggests Parent.Default may work [don't take my advice on this - check it].
    • All of this aside, the actual field name from the other list you are displaying for selection is the one to be used for updating the target. This in both cases below appears to be "Title" [please confirm if I am correct], so: -
      • The Update properties of card Location_DataCard8 should be LocationID.Selected.Title.
      • Likewise Department_DataCard8 should be DepartmentID.Selected.Title
    Again, any further contributions from the group would be welcome.

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 24, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,,

    Yes the Items Properties for the two fields are sourcing data from a separate SP list to the one I need updating.

    Formulas are; -

    Location Field - ItemsSort[Distinct[LocationVDepartment,Title],Result]
    Department Field - Items -Distinct[Filter[LocationVDepartment,Title=LocationID.Selected.Result],Department]

    [These are the same formulas being used in the initial screen for entering data for a new visitor]

    The columns in my SP list for Location & Department were Choices. I changed them both the Single Line of Text and refreshed. Errors appeared for both fields - Expected Record Value.

    The error seems to relate to Default and DefaultSelectedItems properties. They are currently display the formulas, ThisItem.Location and ThisItem.Department respectively in both property fields.



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 23, 2019 06:17 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    When you say "The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment]", do you mean the "Items" property in the drop-downs [what are they]? The data card's sources should be [and seem to be from your screenshot] the target fields to be updated - Location and Department [that is how SubmitForm works]. What you need to tell it in the Update properties is what to write to the source list.

    Patch is a "manual" [but more flexible] function generally used instead of SubmitForm. It would be technically possible to use both, however the SubmitForm would need to be first, then the form refreshed after the Patch, however this process should not be necessary for you.

    Firstly, what is the format of the target fields in SharePoint? If they are lookup fields based on the other lists, you may need the odata, but I suspect they are single lines of text, in which case you do not.

    I also assume the drop-downs "DepartmentID" and "LocationID" display the actual text you want to be updated and are also the names of these fields from the other lists.

    If all of this is the case, I am hoping that using card Update properties of: -
    DepartmentID.Selected.DepartmentID
    and
    LocationID.Selected.LocationID
    should work

    I would welcome any other Forum opinions on this as I only have experience in the methods I use.




    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 23, 2019 05:26 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    I'm having such trouble / issue with this...

    The Datacard for the two fields which I require to be updated [Contents are sourced from a different Datasource [LocationvDepartment] to the one I require to be updated [Image Data] are displaying an error 'The Specified column '@odata.type' does not exist'.

    I've used the Patch function as it's not allowing me to use the SubmitForm function

    I then tried to use the formula within the 'Save' button which does allow me to use the SubmitForm function. Again get the error '@odata.type does not exist.

    The formula is -
    Patch['Image ID',{'@odata.type':"Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Location:LocationID.Selected.Result, Department:DepartmentID.Selected.Result}];

    Image ID is my SharePoint list which I require to be updated
    Location - Is the column to be updated
    Department - Is also a column to be updated
    LocationID - Is the name of the field in my form
    DepartmentID - Is the name of the field in my form.

    The two fields display once the edit button has been selected and the dropdown boxes become active. From here the user can chose differentLocation & Department, which when Saved Updates is selected will change just those columns in my Sharepoint list [Image Data]


    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 05:44 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    This option just involves a normal SubmitForm with the code below in the Update properties of the relevant card.

    The Patch will work as well, except you will need to patch all cards involved in the relevant list update.


    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 22, 2019 05:13 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Warren,

    Sorry, but if I'm not using the Patch function what function would i need to use?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 22, 2019 02:03 AM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    The methodology Mohammed uses is correct. There is however another way of doing this using the same methodology [which I use when the target field is a lookup].
    Instead of Patching, simply try the formula below in the update properties of the card [I have used new lines only to show the logic].

    [
    {
    '@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:LocationvDepartment.Selected.ID,
    Value: LocationvDepartment.Selected.Title
    }
    ]

    NOTE - all of this is case-sensitive [ID does not equal Id] - you seem to have this one.

    To explain [from my humble level of understanding at least]: -

    Firstly, the purpose of the "odata.type" reference is a bit of a mystery to me [and others when you Google it] except I know you need it for multi-value field references to work on anything other than a straight [non-custom] cards generated by PowerApps [it takes care of this in the background].

    On fields in SharePoint based on Lookup fields from another table [not simply multi-value Choice lists in the SharePoint target field], the field actually contains two pieces of information - the actual value you are after and the ID from the other list you are looking up and both have to be passed back to the target list.

    I hope this helps.



    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 21, 2019 05:21 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    I tried to use the formula you suggested but there seems to be an error but I'm not sure why. I've written this in the 'OnSelect' property field.

    The Formula that i have is
    Patch['Image Data', Location:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",id:LocationvDepartment.Selected.ID,Value:LocationvDepartment.Selected.Title}]

    The error message is - The specified column 'Value' does not exist.

    The Value, Location, is the name of my column in the SharePoint list named 'Image Data'

    The Look up list for the cascading drop down fields is called 'LocationvDepartment'

    This also happens for the Department field.

    Any suggestions?

    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 07, 2019 04:44 AM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Mohammad,

    Thanks for your reply,

    Can I just clarify the formula and get a better understand of how the formula works.

    My SP List is called 'Image ID'. This is where the columns are to be updated / Patched Column names are Location & Department.
    The SP list that contains the details for the cascading dropdown boxes is called 'LocationvDepartment'.

    The field names within the Data Cards are named LocationID & Department ID. These relate to the Screen where the editing will take place. These are contained within a form [Form6]

    The screen where the initial information will be selected and sent to the SP list 'Image ID, are called, IDDropdowm_Loc & IDDropdown_Dept and these are contained within a Form [Form2].

    What does the {'@odata.type' represent?

    I've used the Patch function once with the formula

    Patch['ID Badge Request',Form2.LastSubmit,{IDChecked:IDChecked_Dropdown.Selected}].

    Do i need to mention the 'Form' within the formula so the Patch updates on one line?



    ------------------------------
    Chris Clark
    Test Analyst

    Original Message:
    Sent: May 06, 2019 06:16 AM
    From: Mohammad Reza Dorrani
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi @Chris Clark,

    Looks like the 2 fields are lookup fields wherein the data is coming from a separate list

    The lookup columns can be patched [updated] using the following :

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id:Gallery1.Selected.ID,
    Value:Gallery1.Selected.Title}
    }

    where Gallery1.Selected contains the reference to the lookup list

    ------------------------------
    Mohammad Reza Dorrani
    Principal Consultant
    Catapult Systems
    Sugar Land TX
    8322908793

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 15. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Top Contributor
    Warren Belz
    Posted May 11, 2019 11:59 PM
    Reply Reply Privately Options Dropdown
    Hi Chris,

    I am not sure how useful this is and without seeing the actual items property this is a bit hard, however I can give you an example of something similar I do that works fine.

    I have a crew listing drop-down that takes content from a collection from another list [I collect to filter the list, but mainly for mobile speed of operation].

    Overview
    • The collection I called CrewList [collected from a list called Crew, but this is not relevant].
    • The field CrewItem is the list item used in the drop-down.
    • The form is based on a list called Roster.
    • The target field is [Roster.]CrewName.
    Values
    • The Form's DataSource is Roster.
    • The Card's DataField is CrewName.
    • The drop-down's Default is Parent.Default [simply taking Roster.CrewName as the source].
    • The drop-down's Name is CrewDD.
    • The Items property of the drop-down is CrewList.CrewItem.
    • The Update property of the card is CrewDD.Selected.CrewItem
    The last one may be where you need to fix it.

    Good luck,

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509
    ------------------------------

    Original Message
    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 16. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 14, 2019 03:32 AM
    Reply Reply Privately Options Dropdown
    Hi Warren,

    Thanks for the example you have provided.

    I will certainly try the solution, in the coming days and let you know how it goes.

    If it doesn't work i'll send you the properties of the fields that I'm trying to update if that ok?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 11, 2019 11:58 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    I am not sure how useful this is and without seeing the actual items property this is a bit hard, however I can give you an example of something similar I do that works fine.

    I have a crew listing drop-down that takes content from a collection from another list [I collect to filter the list, but mainly for mobile speed of operation].

    Overview
    • The collection I called CrewList [collected from a list called Crew, but this is not relevant].
    • The field CrewItem is the list item used in the drop-down.
    • The form is based on a list called Roster.
    • The target field is [Roster.]CrewName.
    Values
    • The Form's DataSource is Roster.
    • The Card's DataField is CrewName.
    • The drop-down's Default is Parent.Default [simply taking Roster.CrewName as the source].
    • The drop-down's Name is CrewDD.
    • The Items property of the drop-down is CrewList.CrewItem.
    • The Update property of the card is CrewDD.Selected.CrewItem
    The last one may be where you need to fix it.

    Good luck,

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


  • 17. RE: Update a record in Powerapps, which will update record in sharepoint

    0 Recommend
    Gold Contributor
    Chris Clark
    Posted May 21, 2019 04:02 AM
    Reply Reply Privately Options Dropdown
    Hi Warren,

    I've tried to recreate your example but with no luck.

    These are the properties I have for each of the fields / cards that I need to be update the SharePoint List.

    For Location


    Card Properties:-
    Update = LocationID.Selected
    Default = LocationID.Selected

    Field Properties
    Items =Sort[Distinct[LocationVDepartment,Title],Result]

    For Department



    Card Properties:-
    Update =IDDropdown_Dept.SelectedText
    Default =DepartmentID.Selected

    Field Property
    Items =Distinct[Filter[LocationVDepartment,Title=LocationID.Selected.Result],Department]

    I need the Sort formula as there are situations where a visitor may visit a number of different sites and so we don't need to recreate the badge process we just update the site names.

    Please let me know if you need any additional information.

    Again thanks for your assistance

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------

    Original Message
    Original Message:
    Sent: May 11, 2019 11:58 PM
    From: Warren Belz
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi Chris,

    I am not sure how useful this is and without seeing the actual items property this is a bit hard, however I can give you an example of something similar I do that works fine.

    I have a crew listing drop-down that takes content from a collection from another list [I collect to filter the list, but mainly for mobile speed of operation].

    Overview
    • The collection I called CrewList [collected from a list called Crew, but this is not relevant].
    • The field CrewItem is the list item used in the drop-down.
    • The form is based on a list called Roster.
    • The target field is [Roster.]CrewName.
    Values
    • The Form's DataSource is Roster.
    • The Card's DataField is CrewName.
    • The drop-down's Default is Parent.Default [simply taking Roster.CrewName as the source].
    • The drop-down's Name is CrewDD.
    • The Items property of the drop-down is CrewList.CrewItem.
    • The Update property of the card is CrewDD.Selected.CrewItem
    The last one may be where you need to fix it.

    Good luck,

    ------------------------------
    Warren Belz
    Database Developer
    Ventia Utility Services Pty Ltd
    Rockhampton Qld Australia
    +61 409 315 509

    Original Message:
    Sent: May 02, 2019 12:12 PM
    From: Chris Clark
    Subject: Update a record in Powerapps, which will update record in sharepoint

    Hi,

    I'm having issues updating two specific fields, from a Form within PowerApps to update the corresponding list in SharePoint.

    The two fields are cascading dropdown boxes whose contents are supplied by a there own Sharepoint list.

    The information is captured at first in a new form and uploaded to SharePoint. I have a search filter which retrieves that data, where I can update the information as required.

    All the fields accept the two cascading dropdown fields are updated when information has been changed.
    The two cascading fields are part of a form and my formula is SubmitForm[Form6] when selecting the 'Save' button.

    Any suggestion why these two fields do not update my SharePoint list?

    ------------------------------
    Chris Clark
    Test Analyst
    ------------------------------


×

New Best Answer

This thread already has a best answer. Would you like to mark this message as the new best answer?
No

Video liên quan

Chủ Đề