web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / lookup datacards not s...
Power Apps
Answered

lookup datacards not saving on sharepoint list

(0) ShareShare
ReportReport
Posted on by 84

I have a SPO list with several columns. in this SPO list I have a couple of columns as a lookup columns from another list

the form mode set to new. 

and I have a submit button to create new items and save it to the main SPO list. when I click submit the data doesnt save the lookup columns.

 

Main list called: Progression tool. 

lookup list called: progression lookup. 

 

the Onselect property on the button have a patch: 

 

Patch(
'Progression Tool',
Defaults('Progression Tool'),
{
Facility: DataCardValue1_2,
'Employee Name': DataCardValue13_1,
'PROGRESSION TYPE': DataCardValue2_2,
'Certificated Date': DataCardValue11_1,
'Employee Supervisor': DataCardValue15_1
}
);

 

is there anyways to make it work and save the data.

 

mohd1978_0-1707924808960.png

 

Categories:
  • mohd1978 Profile Picture
    84 on at

    Also, I start getting this error message when submit

     

    The requested operation is invalid. Server Response: ATC Progression Tool failed: The string was not recognized as a valid DateTime. There is an unknown word starting at index 1. clientRequestId: f603d261-f56b-4948-9fda-4b0c3c49fd01 serviceRequestId: f603d261-f56b-4948-9fda-4b0c3c49fd01
     
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @mohd1978,

     

    Would it be a possiblity to use SubmitForm instead, since you are using a Form control? SubmitForm takes care of validation by default:

    //Change FormName to the correct form name
    SubmitForm(FormName)
    
    //In the OnVisible of the screen you may want NewForm to create a new instance:
    NewForm(FormName)

     

    Should Patch be required, you will have to refer to the correct control property:

    Patch(
     'Progression Tool',
     Defaults('Progression Tool'),
     {
     //Should multiple selections be allowed use SelectedItems instead of Selected
     Facility: DataCardValue1_2.Selected,
     'Employee Name': DataCardValue13_1.Selected,
     'PROGRESSION TYPE': DataCardValue2_2.Selected,
     'Certificated Date': DataCardValue11_1.SelectedDate,
     'Employee Supervisor': DataCardValue15_1.Selected
     }
    );

     

    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • mohd1978 Profile Picture
    84 on at

    Unfortunately, none of the solutions worked.

    The Submit button worked fine with Submit but it does not save the data to the SPO

     

    Thanks 

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @mohd1978,

     

    Do you receive an error after the changes? Are specific columns not saved or is there no record being saved at all?

     

    Would it be possible to (1) provide more information on the column types displayed on the screen and (2) whether any of the DataCardValue properties have been changed.

     

    Thanks!

  • mohd1978 Profile Picture
    84 on at

    see below, the highlighted in yellow are lookup fields! the name of the lookup list is called progression lookup. I selected the facility and the other fields it used automatically populated. 

    before adding a filter at the progression type. it used to work fine and save the data.

     

    Filter('Progression Lookup', Facility = DataCardValue1_2.Selected.Value).'PROGRESSION TYPE'

     

     

  • mohd1978 Profile Picture
    84 on at

     

    mohd1978_1-1707934276811.png

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @mohd1978,

     

    A SharePoint LookUp column expects 2 columns Id containing the LookUp ID and Value containing the primary column of that lookup column. (defined in the LookUp column settings, Title by default -> see screenshot)

     

    LaurensM_0-1707934559734.png

     

     

    By switching the default Choices() Items property to a Filter, the schema changed. It now no longer only returns those fields, but rather returns the full records of that list.

     

    The Update property of the DataCard (container around your Progression Type dropdown) should have the following code:

    //The Value column depends on the selected column within SP (see column settings & change accordingly)
    {Id: DataCardValue2_2.Selected.ID, Value: DataCardValue2_2.Selected.'PROGRESSION TYPE'}

     With this approach we expect the SubmitForm function.

     

    Was the Facility dropdown changed?

  • mohd1978 Profile Picture
    84 on at

    You are correct. The title has the facility names. I have created a facility column in the progression lookup list. and I made the default property of that card ( Parent.Default)

    Got this 

     

    mohd1978_0-1707935613001.png

     

  • mohd1978 Profile Picture
    84 on at

    I changed the formula to

     

    {Id: DataCardValue2_2.Selected.'PROGRESSION TYPE', Value: DataCardValue2_2.Selected.'PROGRESSION TYPE'}

     

    I get no errors with this code. but still that data not saved on the SPO list

  • LaurensM Profile Picture
    12,516 Moderator on at

    @mohd1978,

     

    Am I correct that Progression Type in the 'Progression Tool' list is a LookUp to the Progression LookUp list?

     

    In this case I forgot to mention 1 adjustment in the Items property (remove .'PROGRESSION TYPE':

    Filter('Progression Lookup', Facility = DataCardValue1_2.Selected.Value)

     

    The display column can be chosen via the right property panel after selecting the dropdown (in my case the column called Value):

    LaurensM_0-1707936745744.png

     

     

    Update property of the Datacard should then allow:

    //The Value column depends on the selected column within SP (see column settings & change accordingly)
    {Id: DataCardValue2_2.Selected.ID, Value: DataCardValue2_2.Selected.'PROGRESSION TYPE'}

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard