Client Tag Expression or Project Gateway Script for Updating Dataset?

Hello,

I spend last night reviewing many articles on how to iterate through a dataset tag to perform system.db.query PRupdates.

But I am struggling understanding if this should live inside a client tag or gateway script that I call for event change script.

I have a project with a main window that displays product information.

When a specific opc tag is updated, values populate memory tags which then get referenced in client tags that drive the main window view. This project can be opened at different stations and the client information determined which opc tags to pull so the view is pulling thst machines information only.

When a specific product is found, I’m trying to capture the information about it (client tag values such as user, and opc tag values) and send them to a mysql database.

So to summarize my ask:
Looking for guidance/help on whether logic to update specific product information through an event handler would be suited for a client tag or project script (python function).

Ex:

Client tag —> evaluate on change —> call a project script that handles taking in the information and writing it to a database then clearing the information passed in.

What is intended to trigger the recording? Is it a user action or just simply a tag value change?

Some clarification a “project script” is not the same thing as a “gateway script”. Which are you considering using?

To update the database you will have to run an update query against the DB. Either through a Named Query or system.db.runPrepUpdate()