Hi All,
I am trying to pass a value from a label in an edit form to a combobox in a different edit form. I have set a variable that is trigged by a new buttons OnSelect Set(label1.Text) and in the combo box DefaultSelectedItem Table({Value:Var}).
This works as expected however when I click my save button OnSelect SubmitForm('Form1'). I get the following error message in the combo box datacard 'Value must be a data entity record'
Can anyone advise?
Thanks
Perfect, Thanks!
Hi @AshleyTaylor ,
OK, then DefaultSelectedItems of the Combo box:
LookUp(tblAssemblies, AssembliesPK = Var)
Actually, there is no need to use the variable, you can use the AssembliesPKlabel.Text directly:
LookUp(tblAssemblies, AssembliesPK = AssembliesPKlabel.Text)
Best regards,
Sorry, I forgot to specify all my tables/relationships are in Dataverse.
Please see form data sources in attached diagram
Thanks
Hi @AshleyTaylor ,
I was thinking you are using SharePoint lists as data sources. But it seems not the case. Could you please confirm this? What data source are you using for the form?
Best regards,
Thanks for your reply,
The combo box is indeed used for a lookup column
(AssemblySpec Lookup is in tblToolsForAssemblies with has a many to one relationship with tblAssemblies which contains column AssembliesPK - This is the value I need passing to the combo box)
I have just tried:
LookUp(tblAssemblies,Value = Var)
but I am getting 'incompatible types for comparison, these types can't be compared error, text'
Please see attached error and ER Diagram
Thanks
Hi @AshleyTaylor ,
It seems that the Combo box is used for a LookUp column, if this is the case, please try below formula:
LookUp(ComboBoxItems, Value = var)
ComboBoxItems means the formula Choices(...) in Items of the Combo box.
Best regards,
I would really appreciate any help with this
Can anyone point me in the right direction?
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional