KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
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.


2 posters

    Use javascript to assign variables

    avatar
    tea


    Posts : 11
    Points : 2076
    Join date : 2018-09-05

    Use javascript to assign variables Empty Use javascript to assign variables

    Post by tea 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..
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2815
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Use javascript to assign variables Empty Re: Use javascript to assign variables

    Post by pavel.vraj 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
    avatar
    tea


    Posts : 11
    Points : 2076
    Join date : 2018-09-05

    Use javascript to assign variables Empty Re: Use javascript to assign variables

    Post by tea 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


    Use javascript to assign variables Empty Re: Use javascript to assign variables

    Post by Sponsored content


      Current date/time is Fri Apr 19, 2024 12:26 pm