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

Custom form fields not saved to SharePoint List.

Hi,

 

I have 2 screens, Screen_1 with a gallery (SharePoint List) and Screen_2 with a form. At Screen_1 there is a button with an OnSelect with

NewForm(Planning_Item_Form);

Screen_2 shows the form with all the cards containing the controls. Some of the controls are ComboBoxes which by default contain Choices from Lookup columns from other SharePoint Lists. But some of the Choices need to be filtered depending on a selection of an other DropDown control. I do this by creating a collection and using Filter().

This all works just fine. It is just that for some of the custom cards the selected value is not stored when using

SubmitForm(Planning_Item_Form)

 

One of the DropDown controls is representing a LookUp Column like this in the Items property and saves just fine.

Filter(TimeOption_Col,Not(TimeTitle in PlanningLine_Col.CheckTime))

 

An other DropDown control is representing an other LookUp Column but is not saving and the Items property looks like this

Filter(PriceListItem_Col, PriceList_LKP.Id = SelectedPriceList.ID)

 

So replacing the original Choices() value in the Items property by a custom collection doesn't seem to be the issue. But what is making the first one to save and the second one to fail?

 

If more info is required, please let me know.

 

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Custom form fields not saved to SharePoint List.

@Power_Robert 

This is my idea... in general you could put this code in Update after you've replaced some of the values with your own.

 

 

{
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id: LookUp(your_sharepoint_lookup_list, your_sharepoint_column_name=ComboBox.Selected.Value, ID),
  Value: ComboBox.Selected.Value
}

 

 

I'm not entirely sure what your lists look like but this is an example of what it could look like.

 

{
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id: LookUp(PriceListItem_Col, PriceList_LKP=MedicalType_LKP_DataCardValue.Selected, ID),
  Value: MedicalType_LKP_DataCardValue.Selected
}

 

Also,  I think you are using a Combobox, not a dropdown... correct?

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Custom form fields not saved to SharePoint List.

@Power_Robert 

The value submitted to Sharepoint is controlled by the Update property of a DataCard.  What code does the Update property for each of the DataCards related to these Downdowns have?

 

Your successful dropdown

Filter(TimeOption_Col,Not(TimeTitle in PlanningLine_Col.CheckTime))

 

Your failed dropdown

Filter(PriceListItem_Col, PriceList_LKP.Id = SelectedPriceList.ID)

 

 

Highlighted
Helper II
Helper II

Re: Custom form fields not saved to SharePoint List.

Hi @mdevaney,

 

The successful one:

Tijd_DataCardValue.Selected

 

The one that failed:

MedicalType_LKP_DataCardValue.Selected
Highlighted
Super User
Super User

Re: Custom form fields not saved to SharePoint List.

@Power_Robert 

This is my idea... in general you could put this code in Update after you've replaced some of the values with your own.

 

 

{
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id: LookUp(your_sharepoint_lookup_list, your_sharepoint_column_name=ComboBox.Selected.Value, ID),
  Value: ComboBox.Selected.Value
}

 

 

I'm not entirely sure what your lists look like but this is an example of what it could look like.

 

{
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id: LookUp(PriceListItem_Col, PriceList_LKP=MedicalType_LKP_DataCardValue.Selected, ID),
  Value: MedicalType_LKP_DataCardValue.Selected
}

 

Also,  I think you are using a Combobox, not a dropdown... correct?

View solution in original post

Highlighted
Helper II
Helper II

Re: Custom form fields not saved to SharePoint List.

Hey @mdevaney,

 

I had to change your suggested solution a bit:

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

This works!

Still not sure why one of the custom(ised) cards is just working the way it is and this one needs to be changed. I might look into that a bit later.

Thank you!

Highlighted
New Member

Re: Custom form fields not saved to SharePoint List.

This solution was also helpful for me, with a minor tweak.  In my case, I was using cascading drop-down menus.

In my final solution below, Certificate Definitions is the list I was looking into for values in the CertificateGroup column.  CertGroupSelectionDD is the name do the dropdown box which was customized with the filtered info.

 

{
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
  Id: LookUp('Certificate Definitions', CertificateGroup=CertGroupSelectionDD.Selected.Result, ID),
  Value: CertGroupSelectionDD.Selected.Result
}

 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,960)