Server Scripting

Hello all I am working on a project that requires I pull data from multiple EXCEL files to populate a recipe. These files are housed on the Ignition server. What I need help figuring out is how can I execute the read from a client to fetch the data from the server. I have the scripts written I can get the data from the server and the client as long as I have mapped drives. But I would like to accomplish this without having mapped drives on the client machine. I moved the scripts from the custom methods on the form component in this case a button to the project library.

Any help would be appreciated. Thanks in advance.

Can you share what you already have code wise?

This sounds like a Vision application. If so, then please edit the question title and add the Vision tag for clarity.

I have done something similar with CSVs. The script that opens and reads the files needs to run on the server, it could either be a tag event script or a gateway tag change script. After opening and reading the files, the results could either be pushed to a database for retrieval by the client or pushed to a memory tag that is read by the client.

In short:

  1. Client writes to a tag (read_files); I like date/time tags for this.
  2. Either tag event script or gateway tag change script runs due to this change.
  3. The script opens and reads the files and pushes the results to either a database or tag.
  4. Finally, the script notifies the client the data is ready, perhaps by writing to another tag.

Gateway message handler. Using system.util.sendRequest() is far superior to toggling tags. Especially when multiple clients might want to do this simultaneously.


Thanks @pturmel, now I get to refactor a few applications.

Thanks @mcgheeiv , I believe that will work for me and thanks to all the other reply’s/help much appreciated.