
I am having a hard try avoiding null outputs from selected items of combobox in Power Apps as it produces a TriggerMismatch error when a dataverse connector is added.
Based on my observation, a blank array [ ] is more preferred than a null value for my flow to work with a dataverse list row connector on it. However, I can only do this inside the canvass app by selecting and unselecting values, which is kind of a hassle for users.
Can there be any expression to get to the values above? I am using this expression on my OnSelect Properties of my canvass app button.
// Export CSV and Get File URL
Set(
csvfileURL,
'Copyof-EXPORTCSV'.Run(
{
text: ListBoxProvince.SelectedItems.Value,
text_1: FilterBox_Classification.SelectedItems.Value,
text_2: FilterBox_ProjectTag.SelectedItems.Value,
text_3: FilterBox_Entity.SelectedItems.Value,
text_4: FilterBox_Type.SelectedItems.Value,
text_5: FilterBox_Muni.SelectedItems.Value
}
).fileurl
);
// Notify User
Notify("The copy of csv file has been sent to your email successfully. Please check your inbox.", NotificationType.Information);
Thanks,
Hi @jonahinguito ,
Can you try the following code:
Set(
csvfileURL,
'Copyof-EXPORTCSV'.Run(
{
text: Coalesce(ListBoxProvince.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)),
text_1: Coalesce(FilterBox_Classification.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)),
text_2: Coalesce(FilterBox_ProjectTag.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)),
text_3: Coalesce(FilterBox_Entity.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)),
text_4: Coalesce(FilterBox_Type.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)),
text_5: Coalesce(FilterBox_Muni.SelectedItems, JSON(Table(),JSONFormat.IgnoreUnsupportedTypes))
}
).fileurl
);
If 'Coalesce' doesn't work, try
If(
!IsEmpty(ListBoxProvince.SelectedItems),
ListBoxProvince.SelectedItems,
JSON(Table(),JSONFormat.IgnoreUnsupportedTypes)
)
This will provide blank array, similar kind
Hope this helps