Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show customers based on a button

Hello

If i have a listbox with customers from A to Z - But i have sooooo many i wanna split them up.

I wanna split them up by a button

My button should be named A to F and when i press that button, i should only be able to see customers from A to F in a listbox...

How do i do that???

I created a listbox called Customers

And a button called A to F

In my button i created an action called select in field (field: Customers, Search string: if(DimCustomers < 'G', DimCustomers, '')

But that does not seem to work?

16 Replies
Not applicable
Author

brilliant, can you maybe explain what the expressions do?

what does if(cid,1,0,1) do??

and what does if(dimcustomers,1)>'m',dimcustomers do??

Not applicable
Author

if i use a variable and do like you said. It will only be show customers from A to M, but when i try to hit the button again, to see the rest, it disspear, like its hidden

Not applicable
Author

How come my table is hidden when trying to make it a variable, i can repost the document, so you can see what i mean?

and what if i want to make a button for both A to M and a button for N to Z

*****New document uploaded with new example

alexpanjhc
Specialist
Specialist

if(cid,1,0,1) is to make the cid change every time a click is happen.

left

(DimPotentialCustomers.CustomerID ,1)>'m',  is to make sure all the customer's first letter  is from A-M.

if you have 2 buttons that's fine too, you do  need to 2 variable for each botton and then in the action set them to 1.(you do not need if(cid,1,0,1) instead you juts put 1 there)

Not applicable
Author

how did you make my listbox able to take from N to last when hitting button?

Which expressions says that ?

Is tgat because of the 1 in left(dimpotentialcustomers,1) > 'm' ?

So when CID is 1 its bigger than M ??

alexpanjhc
Specialist
Specialist

there are actually 2 list boxs. one shows from A-M the other shows from N-Z

When the button was hit, one is hidden.

in the layout of the listbox, there is a show condition look at there.

left function returns the number of the charactor of the string, in this case is the first charactor of the customerID.

CID is only a variable   to define the show condition.

Not applicable
Author

AHHH so you placed two listboxes ontop of each other!! FANCY!! and tricky! Then it works... thanks