Saving to the Same CSV file

When you click the Run Action button (Double Arrows) does it give you an error?
Does the path and file name exist on the gateway machine?

Sorry for the delayed response. I was in Inductive Jail since it was my 1st ever post.

Inductive wouldn’t let me post past 19 replies. I had to wait 19 hours.
Seems like an unnecessary requirement when this is a help and idea forum.

HourlyDTQuery = “C:\Path\ToFolder\Hourly_DT_Query.csv”
system.file.writefile (HourlyDTQuery,reportBytes,1)

It seems like that error was because write isn’t the function but writeFile is. It looks like you corrected that in your response here, but make sure that the F is capitalized if it is still giving you an error.

HourlyDTQuery = “C:\Path\ToFolder\Hourly_DT_Query.csv”
system.file.writeFile (HourlyDTQuery,reportBytes, 1)

It Works !!!
I greatly appreciate every ones help. I learned very much.

Thank you !!!

For future help, you can press control-spacebar after a system call to get completion hints and proper capitalization.

type system. and hit control - space
type system.file. and hit control - space
etc.
Note the periods on the end.

I cant seem to get the script to work when writing to a network drive. I have changed the settings in the Ignition.conf, I set the Gateway as a network access with permissions, I can change the drive letter to C: and I save to the local drive. What am I missing. Please.

Are you stopping then starting the Ignition Gateway Service after making conf changes?

Yes.

I close down the Designers and restart everything

Because it’s a network drive you need leading double back slash

Does your conf look like this?
conf

wrapper.share.1.location=\10.36.16.36\wrapper
wrapper.share.1.target=J:
wrapper.share.1.type=DISK

wrapper.ntservice.account=nrb\caicrmetrics
wrapper.ntservice.password=Koyo1234
wrapper.share.1.account=nrb\caicrmetrics
wrapper.share.1.password=Koyo1234

wrapper.share.1.location=\10.36.16.36\wrapper
wrapper.share.1.target=J:
wrapper.share.1.type=DISK

You only have a single backslash at the start. Double it.

Also probably a good idea to edit your post removing the credentials. Just in case.

There are 2 \ before the IP, some reason when I copy and paste here it only shows 1

wrapper.ntservice.account=un
wrapper.ntservice.password=pw
wrapper.share.1.account=un
wrapper.share.1.password=pw

Try this, remember to stop and start gateway

Edited post to remove OP credentials

Use the pre-format button </> to prevent collapse of special characters and indentation in any plain text you paste here.