0

code TRIGGER AFTER UPDATE

Hello eve

Hi everyone, I need help with a "Trigger after Update"
As soon as I select from the Combo box "Chi?" automatically must select the same answer in the "Consulente" combo box.
I state that "Consultante" is a linked table and that is "Chi?" that "ConsulenteSchermata 2022-01-19 alle 09.04.55" has the same answers and the same id

Thank you

5 replies

null
    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    Hello AdminLike

    I'm not sure if i have understood you correctly but. I recreated this as best as I can..

    Data entry form (Test1) with a linked field (to table Locations - this table has just one combo box field in it)

     

    Test1 Data entry Form 

    Screenshot 2022-01-24 at 12.18.42

    Select a text option from Chi dropdown

     

    Screenshot 2022-01-24 at 12.15.10

    Linked field (related field) is auto updated

    Screenshot 2022-01-24 at 12.15.22

     

    Click on linked field and it pops up

    Screenshot 2022-01-24 at 12.15.39

     

    So I placed the following script in - Trigger after update in the chi field

    let ChiNo := number(Chi);
    Locations := ChiNo

     

    Does that give you what you want?

    • Tour Like
    • IschiaLike
    • 2 yrs ago
    • Reported - view

    Thank's a lot my friend

    IT?S PERFECT‼️

    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    oh Good

    Technically - Doing what you asked for gives rise to a potential issue insofare as it relys on having a combo box in your consulene table and a drop box in the data table field (chi) that needs to be the same. The issue is ensuring they are kept the same....

    You could of course do it the other way around and use the related link field to find the item (ie Fran) and then have that field update the chi field with a TEXT extry thus having drop down data in one table ..

    In this case you would change Chi field from drop down to a text field

    and put this script in the trigger after update in Consulente related field.

    Screenshot 2022-01-24 at 15.46.07

    Screenshot 2022-01-24 at 15.46.14

    Mel :-)

    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    I didn't add the script !!! DOH!

    let ChiNo := text(Locations.Consulente);
    Chi := ChiNo

    • Tour Like
    • IschiaLike
    • 2 yrs ago
    • Reported - view

    Mel Charles Tnks a lot‼️