Skip to Content

Which Table maintenance Generator event suits for below scenario?

I have 2 tables with below mentioned fields

TABLE 1

Hub code

Hub name

TABLE 2

Hub code

Hub name

my requirement is, when ever user make any changes to HUB Name in TABLE 1 and click on SAVE button then it should check for Respective HUB Code in TABLE2, if that HUB code is available in TABLE 2 then Error message should trigger Like "Entry already available in TABLE2" and it should go to initial screen. Can anybody suggest me which TMG Event suits for this Requirement with sample code.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 19, 2017 at 09:40 AM
    -1

    Hi Kiran,

    You can use 05-create a new entry or 21-fill hidden fields.

    <removed by moderator>

    Regards,

    Aditya

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Aditya,

      Thanks for your Reply.

      But here the case is Record is exists in both the tables. when HUB Name is changed and click on SAVE button then Error message should trigger if entry exist in TABLE2.

      Can i choose EVENT 01(Before saving the data in the database)

  • May 19 at 07:21 AM

    Why are you storing redundant data? Fix your data model and you won't have this kind of problem.

    Add comment
    10|10000 characters needed characters exceeded

  • May 19 at 01:30 PM

    Hi,

    use event code '01'(Before saving the data in the database),

    write your necessary logic in this event for TABLE1.

    Add comment
    10|10000 characters needed characters exceeded