cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Power_Robert
Level: Powered On

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
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

4 REPLIES 4
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)

 

 

Power_Robert
Level: Powered On

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
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

Power_Robert
Level: Powered On

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!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,170)