Forum Discussion

Veroniquelu's avatar
Veroniquelu
Contributor
9 years ago
Solved

How to use the value in the previous function

For example:

 

function a (b)

{

return (c:c)

}

 

function a (e)

{

return (f:f)

}

 

function d (c,f)

{

//Statement

}

I am calling the functions thru excel, I would like to run function a twice and use the returned value in function d. how can I do that ? or if there's any other easier way?

  • Veroniquelu's avatar
    Veroniquelu
    9 years ago

    My issue has been resolved, I simply used multiple Global Variables instead of trying to use Global Array. Thank you all the same.

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Veroniquelu,

     

    Is it JScript?

    Is this what you are looking for?

     

    function d (a(b),a(e))
    {
    //Statement
    }

     

    • Veroniquelu's avatar
      Veroniquelu
      Contributor

      No, it's Jscript, but it's not in script, it's calling thru excel like below, DND function will be using two params returned by CreateAnItemUnderAnyTree( ). I think I need to create a global variable, but I really have no idea about the details... I do know how to create a global variable, but I don't know how it would serve my purpose.  

      Untitled.png

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Veroniquelu,

         

        So, what is your question about? Do you want to call a function whose name is listed in an Excel?