Complex nested parameters

Hi Makers!

Today I want to achieve parameters’ behaviour as described below.

  1. I want to list companies in 1st parameter - a select.
  2. If selected company has a flag (VAT payer) set to true, I want to list some static values of document types in 2nd parameter - also a select. If flag (VAT payer) is set to false, there should be other set of static values in this select / list.
  3. I want to have 3rd select with list of numeration series dependent on selected document type.

What I did and cannot do already:

  1. I listed companies with an RPC
  2. I listed these static values but I don’t know how to narrow this list according to the company’s VAT payer flag’s value. I don’t know how should I get and where should I use a value of this flag.
  3. I listed numeration series with an RPC (dependent on selected company, but not on company’s VAT payer flag).

I guess simple store / nested directives won’t work here. I guess I need to make additional request for selected company to get it’s VAT payer flag’s value so I can use it to filter options (or select proper options’ set) in Document types list / select. I just don’t know how…

Please provide the relevant code sections of your custom app for what you have already done.

2 Likes