cancel
Showing results for 
Search instead for 
Did you mean: 

Enable the default selected value of Combo box to filter a Gallery BEFORE user interaction

This issue is that a gallery will not display items matching a combo box value until a user interacts with the combo box. This is because even if you set the DefaultSelectedItems to something, the gallery filter will not recognize the item displayed int the combobox as "selected" and the gallery will be blank until the user interacts with the combobox. This was confirmed by a community support team member here.

 

This makes it difficult to pass the variables and parameters to the combo boxes on various screens and have galleries show the expected items. Each screen has to have the user reselect his category again and again (or use hokey work-arounds that don't work very well).

 

Status: New
Comments
Level: Powered On

I've played a few more hours with the system and finally figure out something that works !!! Yes I get the default items selected in the combo box now!

in short, before I had this :

- Update on the data card was /Concat(ddGeo.SelectedItems, Title, "; ")/

- my DefaultSelectedItem wasI /ForAll(Split(ThisItem.Geo, "; "), Result)/

- my 'items' on the combo was /myRefList.Title/ which contains the reference list

 

I changed it to

- Update, Kept the same

- my DefaultSelectedItem is now /Filter(myRefList, Title in Split(ThisItem.Geo, "; ")).Title/

- my 'items' on the combo is for now still the same, I had some issue and had it replaced with Filter(myRefList, true).Title, but that's uneccesary. Having just /myRefList.Title/ works

 

It seems that you need somehow the same kind of 'source' between defaulselecteditems and items... doesn't makes much sense to me, at the end it's a list of textual value, regardless of where they come from they are the same.... anyway that fixes the issue

 

 

I'm leaving my previous post below because I believe there's still a bug overall in this DefaultSelectedItem

For several days I couldn't figure out what I was doing wrong, this sounds more like a bug rather that a new idea. If the user doesn't reselect the items, I end up with actually the right number of 'separator' in the updated field, so somehow the 'selecteditems' knows how many items were set in the 'defaultselecteditem' but just lost the actual content. 

 

As a side note, my Update on the data card is /Concat(ddGeo.SelectedItems, Title, "; ")/ and on my DefaultSelectedItem I have /ForAll(Split(ThisItem.Geo, "; "), Result)/ If I don't do the 'ForAll' and just have the Split I get nothing at all in the combobox

 

Note: I've done more debugging to confirm my first findings and when my form is open for an edit, I populate a different dropdown with the combobox ddGeo.SelectedItems (which luckily is updated after the defaultselecteditems) to validate that indeed the 'SelectedItems' is getting updated by the defaultselecteditems as I end up with the exact number of items in my drop down, just all blanks...

 

Note2: I don't know your workaround but for now, all I did was change the 'update' so that it saves the 'previous selection' if if it wasn't touched (ie even if the selecteditems has items, theyr are all blank) or new new selected items (which them would add a non blank item). I've I instructed the users that if they wanted to add something, they have to remove everything from the combo and reselected everything. Update code is now is

/  If(

       IsBlank(Concat(ddGeo.SelectedItems,Title,"")),

           ThisItem.Geo,

           Concat(ddGeo.SelectedItems, Title, "; ")

   )

/

Level: Powered On

@ccauser your solution worked for me too, but I had to remove .Title.

 

Thanks so much for figuring out a work around!