KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


Use javascript to assign variables

Share

tea

Posts : 10
Points : 91
Join date : 2018-09-05

Use javascript to assign variables

Post by tea on Mon Oct 08, 2018 4:09 pm

Hi! Is it possible to use javascript (or one of the other code alternatives) in Kapow to assign variables? Some time sthere are so many variables to assign at once, so it might be easier to use code than have ten or so assign steps after one another. For instance if you want to reset all attributes for a type.. 

I tried using Execute Javascript - Custom Javascript, but with no result. The step does not fail, but it does not execute either.
 
Maybe javaScript is not the right thing to use? I am not trying to alter anything on a website, just regular process logic..
avatar
pavel.vraj

Posts : 78
Points : 822
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Use javascript to assign variables

Post by pavel.vraj on Fri Oct 12, 2018 10:23 pm

Hi,

if you want to reset all attributes, create empty variable with the same complex type and in one Assign Value step assign this empty variable to your, you need to reset.

Best regards,
Pavel

tea

Posts : 10
Points : 91
Join date : 2018-09-05

Re: Use javascript to assign variables

Post by tea on Tue Oct 30, 2018 7:49 pm

Great idea, thanks!

Would still like to know if it is possible to use code to assign more variables in one go, though, for the cases where you o not simply want to reset everything to blank.

Sponsored content

Re: Use javascript to assign variables

Post by Sponsored content


    Current date/time is Thu Nov 15, 2018 12:05 pm