Page 1 of 1

React to lookup question

Posted: 2021-10-07 12:57
by asharaq
Hello members,

I am an IT Engineer, my field of work is limited to Network & Servers... but I always try to learn new things.. coding is totally different for me... that's why I purchased both Appgini and Appgini helper (one line of code is ok for me) ;)

I have read and implemented react to lookup method from Appgini Helper website, but I want to try something else, I don't know if it is possible...

in the attached, I want to make each field appear once the user has selected one by one..

sorry for my English, I hope it is clear ,, thanks in advance..

Re: React to lookup question

Posted: 2021-10-13 05:23
by asharaq
@jsetzer, kindly help me on this please..

Re: React to lookup question

Posted: 2021-10-13 09:01
by jsetzer
Interesting idea.

First, hide all but the first using .hide() method.

Next, register onChange handler for all lookups

In each onChange event handler, check the value using .getValue method.
Then hide or show the next lookup.

It may become more difficult when opening existing records having values already selected.

You can evaluate dv.isInsert() to see whether you are in insert mode or in edit/view mode.

I foresee problems when field order changes and when for example lookup 4 has value but lookup 3 not.