I have filtered a Dataverse Combobox as shown below and receive a error when the form is submitted/saved. If I remove the filter is works fine.
Items Filter:
Filter(Choices([@Projects].new_ItemValue2), EntCode = "PRO1" && Module="Project" && Prompt="Status").ItemValue
Itemvaluecard Update code:
DataCardValue26.Selected
Any help would be appreciated!
Hi @Syvenn,
If that combo box is also a LookUp, you will have to change the Items property of the dropdown from the Choices([@TableName].LookUpColumn) to [@LookUpTableName].
This change will allow you to select more displayfields or search fields than the primary Name. In order to see all valid options follow the steps below:
Would it be possible to select one of my previous comments and mark it as a solution in order to close the topic.
Thanks!
I'm adding another combo box but I can't change the Display or Searchable fields. Keeps defaulting to ["cr965_name"]. The other combo box allowed the change. Is there a lock on these fields?
Change the filter to the lookup table worked....Thanks
Change the filter to the lookup table worked....Thanks
I R&R the comobox box and the defaults:
Items: Choices([@Projects].new_ItemValue2)
DisplayFields & Searchfields are: ["cr965_name"]
It works ok
@Syvenn another possible workaround would be changing the [@Projects].new_ItemValue2 (Projects is the table that is going to be updated and new_ItemValue2 is the LookUp field name, correct?) to the table the lookup records are in.
I will call the LookUp table ProjectLookUp for demonstration's sake (change this to the actual name of that table):
Filter([@ProjectLookUp], EntCode = "PRO1" && Module="Project" && Prompt="Status")
@Syvenn just for me to get a better understanding, did you test it now?
With removing the filter do you mean only leaving in Choices([@Projects].new_ItemValue2) or did it originally have another value?
Has anything else been changed in the data card or dropdown since your last test?
The combo box populates ok. It doesn't save to the database. If filter is removed it does save.
@Syvenn thanks for the info!
Unfortunately I am unable to recreate that particular issue. I also added extensive filtering to my test scenario and was able to update that LookUp field.
When you use the filter without the .ItemValue at the end, normally the LookUp should populate.
Filter(Choices([@Projects].new_ItemValue2), EntCode = "PRO1" && Module="Project" && Prompt="Status")
Originally that will have caused the issue, because the selected value was the .ItemValue field and you need to patch a record.
Instead of typing the display name you can also change it by clicking on the DropDown, going to the property panel on the right and clicking edit display field:
If your value without the filter works and is Choices([@Projects].new_ItemValue2), I don't really see why the filtering would change the patch functionality.
1. Code to save is the submit function: SubmitForm(ProjectDetailForm_3)
2. The field is a Lookup field
3. Item and Datasource are correct
It works ok if I remove the filter, but need the filter to populate the box with the correct data
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional