How do you add an "All" entry at the head of a mobile dropdown widget?

How do you add an "All" entry at the head of a mobile dropdown widget?

  

In a mobile app, how can I insert a dummy entry for "All" as the first entry in the dropdown widget?  I tried an aggregate for the dropdown items and then inserting a dummy entry using id=-1 and value="All" at the head of the list using InsertAt server action; however this causes the screen to freeze.  It seems editing anything in the list using AfterFetch is causing trouble.

The dropdown is part of a filter.  It needs an option for all at the top in case the user wants to designate all the items should be included in the search.  Thanks.




Hi David,

I wish I could give you an answer, but unfortunately everything I try manipulating the input list of a dropdown fails (the "hanging" is caused by a stack overflow). I would tetatively say this is a Platform bug, and for now I don't know whether there's a work around.

Hi David (and Kilian),

I do not have any problem in adding an element to the start of the list that is the source of the dropdown. I'm doing it in the after fetch of the aggregate from where I get the original list.

By the way, I tried it in a Personal using Service Studio version 10.0.715.0. I'm using the latest version of the SilkUI Mobile.

Cheers,

José

Hi José,

We are running Platform 10.0.705.0, I used SS 10.0.715.0 as well, and the Mobile Patterns eSpace is version 1.4.3.

Hi Kilian,

My Platform is 10.0.702.0. My Mobile Patterns is 1.5.1.

Cheers,

José

Thanks for the info!

@David, what's your Platform and Mobile Patterns versions?

My Platform is 10.0.713.0. My Mobile Patterns is 1.4.3.  Since this works for you Jose, I was thinking about upgrading to MobilePatterns 1.5.1 - how is that done? Is it the same as upgrading "Silk UI Web"?

Also, I am basing the dropdown list on local device storage rather than pulling the list from the server.

Solution

Hi David,

Perhaps I misunderstood something, but isn't this what you're looking for?

That's the displayed value for the empty value.

Hope it helps

Solution

Yes, I was trying to insert this empty value.  It's much easier this way!  Thank you Henrique.

I set Empty Value = "All", and then look for the value NullIdentifier() in the aggregate where clause.

Heh, I completely missed the "Empty value" thing, I was looking for a "Special List" kinda thing :). Thanks Henrique! Still, it's strange that ListInsert causes that weird issues... I'll see if we can upgrade and test again.