web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modify OnSelect proper...
Power Apps
Unanswered

Modify OnSelect property expression to output blank array instead of null

(0) ShareShare
ReportReport
Posted on by 46

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.

jonahinguito_0-1708679325285.png

jonahinguito_1-1708679422413.png


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.

jonahinguito_2-1708679471845.png


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,

I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    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

    Ethan_R_0-1708722237332.png

     

    Hope this helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard