Topic Options
#55681 - 02/09/18 12:46 PM Finding the Week of Year in PlanetPress
rfielder Offline
OL Newbie

Registered: 10/28/15
Posts: 17
I am using VBScript to create a file using the current date as part of the file name. The VBScript code is called using the "Run Script" routine.

I then:
1 - use the "Load External File" to open the file created, using "%y%n%d" as part of the file name
2 - write to the file in a workflow using the "Add/Remove Text" routine
3 - use the the "Send to Folder" routine to name the file and save the file, using "%y%n%d" as part of the file name.

The logic lets me accumulate data on a daily basis. It works because I use the year, month and date in each step, so it knows the correct file name.

However, the original request was a weekly file, not a daily file.

I can use VBScript to determine the Week of Year. That is a standard part of date, and can be pulled using the DatePart() functaion.

The Week of Year can be used to create a file so that you have one file per week, starting at "201801" and going to "201852".

However, I don't see any way of determining the Week of Year within PlanetPress.

And, I don't know how to pass a value from VBScript back to PlanetPress, so that the VBScript can put the Week of Year into a variable, which PlanetPress then uses as part of the file name.

Is there a way to determine the Week of Year in PlanetPress?

If not, can someone please point me to the documentation that explains how to pass values from VBScript to PlanetPress?

Thanks!
Robert Fielder

Top
#55683 - 02/12/18 06:32 AM Re: Finding the Week of Year in PlanetPress [Re: rfielder]
Hunt3r Offline
OL Newbie

Registered: 02/13/17
Posts: 13
Hello,

You can use the Watch.SetVariable method to set VBS variable to Workflow variable. (Previously you have to create a local or global variable in worfklow.) You can only use strings, so always check the type.

Documentation:
Search for "Watch.SetVariable" here

Top
#55692 - 02/13/18 02:58 PM Re: Finding the Week of Year in PlanetPress [Re: rfielder]
rfielder Offline
OL Newbie

Registered: 10/28/15
Posts: 17
Hunt3r - thanks! That worked well.

And thanks for the link. Lots of great information!

Top