JS to look at PrivateData as a condition with variable or script expiression

Post Reply
rhd_ole
Member
Posts: 103
Joined: Mon Jan 24, 2022 5:36 pm

JS to look at PrivateData as a condition with variable or script expiression

Post by rhd_ole »

Hi All -

I'm not sure why I'm struggling with this but I'm looking to create a script that will use the PrivateData of "size" that if true will move on to the next folder, and then use an 'all others' condition for any sizes that are false.

I am currently using 'Define condition with variables" but its cumbersome to manage all these sizes and I think it would be easier to place a script to do this since there are several flows that I manage that use this type of routing.

So for example all sizes that are : 6x9, 4.25x5.5, 10x13, would be true and move to the next folder, all other would go to a different folder to additional processing.
Color Science & Workflow Automation
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: JS to look at PrivateData as a condition with variable or script expiression

Post by jan_suhr »

You can use the app Row2Variables. It will use an Excel or CSV file to get the value you need.
Tabel would look like this:
6X9 True
4.25X5.5 True
10X13 True
7X10 False

You can set it up to any value instead of True and in that way send it to different outgoing connections depending on the sizes youo have.

The result from the App will be a PrivateData tag that you use.

https://www.enfocus.com/en/appstore/pro ... 2variables
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
rhd_ole
Member
Posts: 103
Joined: Mon Jan 24, 2022 5:36 pm

Re: JS to look at PrivateData as a condition with variable or script expiression

Post by rhd_ole »

Great I'll take a look.

I will only know the sizes that would be true, any size not listed would need to go to a different folder. I will play around with it.
Color Science & Workflow Automation
rhd_ole
Member
Posts: 103
Joined: Mon Jan 24, 2022 5:36 pm

Re: JS to look at PrivateData as a condition with variable or script expiression

Post by rhd_ole »

jan_suhr wrote: Wed Apr 05, 2023 4:17 pm You can use the app Row2Variables. It will use an Excel or CSV file to get the value you need.
Tabel would look like this:
6X9 True
4.25X5.5 True
10X13 True
7X10 False

You can set it up to any value instead of True and in that way send it to different outgoing connections depending on the sizes youo have.

The result from the App will be a PrivateData tag that you use.

https://www.enfocus.com/en/appstore/pro ... 2variables
I'm not getting this to work as I need. My issue is I only know the sizes I want, any not on the list I need to go to a different outgoing connection. They fail and do not give a PriveatData tag as a result.

I will continue to mess with this and try and get a script to work
Color Science & Workflow Automation
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: JS to look at PrivateData as a condition with variable or script expiression

Post by jan_suhr »

In the Row2Variables you can set up the Warning outgoing connection to let missing values go that way.
That should solve the problem.
Check the documentation.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply