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!
Solved! Go to Solution.
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?
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)
Hi @mdevaney,
The successful one:
Tijd_DataCardValue.Selected
The one that failed:
MedicalType_LKP_DataCardValue.Selected
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?
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!
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
}
User | Count |
---|---|
251 | |
125 | |
106 | |
50 | |
49 |