Highlighted
sivabalan_n Absent Member.
Absent Member.
3733 views

How to update Auxiliary Table when a new entry added or Updated?

How to update Auxiliary Table when a new entry added or Updated? I need do some calculation when an entry is added or modified to a Auxiliary table. How to achieve this?
0 Likes
5 Replies
PM Thompson Acclaimed Contributor.
Acclaimed Contributor.

Re: How to update Auxiliary Table when a new entry added or Updated?

Hi Siva:
You can setup a Notification that runs an AppScript when a new entry is added to an Aux table. The script can perform the calculations and update other fields or tables as needed.

There is a delay between the time the new record is added and when the Notification Rule detects that and schedules the script to run. That setting is in Configurator.
lmattie Absent Member.
Absent Member.

Re: How to update Auxiliary Table when a new entry added or Updated?

You can also create a custom form for the aux table and then use Form Actions and/or JavaScript.

If you use a Notification AppScript, be sure to remember to update your item in the database using UpdateWithLock (since you will not be within a transition context).
sivabalan_n Absent Member.
Absent Member.

Re: How to update Auxiliary Table when a new entry added or Updated?

Thanks Paul & Lynn. The auxiliary item will be added thru command line and please confirm if I used Notification App Script there wont be any performance issue.
0 Likes
PM Thompson Acclaimed Contributor.
Acclaimed Contributor.

Re: How to update Auxiliary Table when a new entry added or Updated?

Do you mean the item will be added to the aux table "outside" of SBM (i.e. using direct database access)??

If that is the case, then the Notification approach may not work for you. I think Notifications use the "Changes" tables. Lynn will know more ....
0 Likes
lmattie Absent Member.
Absent Member.

Re: How to update Auxiliary Table when a new entry added or Updated?

Siva,

The AppScript via Notifications is almost as efficient as the AppScript in transition context. The biggest difference is that you will have to read and update the item from and to the database. For an aux item, this will be very efficient. Since the command line interface uses the SBM C++ API, the notifications will still fire just fine.

Cheers,
Lynn
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.