This topic is locked

Creating a Alpha-Filter for a list.

11/15/2023 7:29:10 PM
PHPRunner Tips and Tricks
DealerModules authorDevClub member

I am not sure if anyone has a need for this. After some Googling, customizing to PHPRunner and some trial and error I was able to get an Alpha-Filter working on some list pages that had a lot of entries.

img alt

I started off by going into Designer and inserting a new container above the "Add New" button. I merged the new container and aligned it to center.
I clicked the Insert button on the second line and selected "Code Snippet".
I renamed the code snippet to "invcustomers_alpha_filter" and added the code below the red line to make it work.

img alt

<font color="red">Be sure to replace the "invcustomers_list.php" with your list page specific link for your application. (In two locations below.)</font>

img alt

Hope this may help someone else.
Paul

DealerModules authorDevClub member 11/15/2023

Not very good with working with the forum posting. My first attempt above did not render well. So please follow the new instructions below.

I am not sure if anyone has a need for this. After some Googling, customizing to PHPRunner and some trial and error I was able to get an Alpha-Filter working on some list pages that had a lot of entries.

img alt

I started off by going into Designer and inserting a new container above the "Add New" button. I merged the new container and aligned it to center.
I clicked the Insert button on the second line and selected "Code Snippet".

img alt

I renamed the code snippet to "invcustomers_alpha_filter" and added the code below to make it work.
img alt

img alt

Hope this may help someone else.
Paul

mbintex 11/16/2023

Hi,

thanks for sharing.

But ...

Why donĀ“t you use inbuilt functionality for that?

img alt

And perhaps to speed up the filtering base it on a generated and indexed Initial-field like that

ALTER TABLE Adressen ADD Initial varchar(1) GENERATED ALWAYS AS (left(upper(Kurzname),1)) stored;
ALTER TABLE Adressen ADD INDEX `Initial` (`Initial`);
DealerModules authorDevClub member 11/16/2023

Hi mbintex and thanks for commenting.

I did not know that it was built in. Thanks for showing it to me.

Paul