Filter based on value in other field just entered

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mgqz
User
Posts: 88

Filter based on value in other field just entered

Post by mgqz »

Hi All. In PHPM11

I have search in the help and trying to see the options but do not know where to setup this...

I need to filter a select dropdown field based on a value of a prior field so for example:

On add I have a field named "document_type" that has 5 options

and i have an "account" field with aprox. 100 possible values (another dropdown) but I would like to filter those 100 based on the answer of the document_type field but is not a value field but a condition for example

if document_type = 1
filter account to all account starting with '113','116',118','51'

if document_type=2
filter account to all account starting with '213','216',218','71'

etc...

how can this can be implemented ? both field are in the same table and form, already able to show account with lookup but want to narrow possible lookup values based on above conditions..

thanks

thanks


mobhar
User
Posts: 11745

Post by mobhar »

Have you tried "Dynamic Selection List"? Read its tutorial from PHPMaker help file.


mgqz
User
Posts: 88

Post by mgqz »

Thanks, I have seen this but it seems is based on parent field not exactly a condition..

I can add a field in the parent table with something like

doctype ,valid_accounts
--------,------------------------------
doctype1,'113','115','116','556','566'
doctype2,'119','120','130','520','550'
doctype3,'111','112','113','678'

so for example if the user selects in parent dropdown the doctype2
my condition to show valid values in dropdown of account (child) would be not a simple filter but something like this:

select account from accounts where company=<UserCompany_from security> and substring(account,1,3) in ('119','120','130','520','550') order by account

hope I explain better, can this condition be put there.. ?


Post Reply