Trigger

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Trigger

Post by uchhavi » 2019-04-22 18:04

Hello,

Is there any way we can make triggers in appgini?


My Issue:
I want to create a stock item table and define stock part number based on the stock type I choose from the dropdown.

Ex:
Stock Type: Raw Stock;;Assembled Stock;; Finished Stock

When I choose Raw Stock from the drop down, the program should give the value as RAW-01 and may be after enteries of other stock items if I choose another Raw Stock Item, then the entry should be RAW-02 and same for other stock Items... ASS01.. 02 or FIN01 .. 02..

Is it possible? if not then please can u suggest an alternative to achieve this.
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Trigger

Post by pbottcher » 2019-04-22 19:50

Hi Chhavi,

yes that is possible. You need to register for the change of the dropdown and once a change happens, retieve the max index for your stock type.
If none exists, start with 01, and if one existes, use it and increment it. To retrieve the value you should retrieve the value via an AJAX call to the database, passing your stock type and retrieving the index value. You should consider having an index coloum for each stock type, as it makes the SQL easier.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Trigger

Post by uchhavi » 2019-04-24 08:03

thank you..
Best regards,

Chhavi Jain

Post Reply