Add Results of 2 Separate Scripts

Optuma Forums Optuma Scripting Add Results of 2 Separate Scripts

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #65631
    Louis
    • Topics: 14
    • Replies: 21
    • Posts: 35

    Hi,

    I have a watchlist. I have 2 scripts. Both return numerical values properly in my watchlist columns.
    The first is ASC_IntermediateTermRS
    The second is ASC_LongTermRS

    I now want to add the values returned by both scripts. In the watchlist my results are all 0%. I know the names of the scripts are correct since I did not type them by hand but chose them from the script function properties. Please help me to see my scripting mistake. Thank you.

    #65638
    Matthew
    • Topics: 5
    • Replies: 421
    • Posts: 426

    Hi Louis,

    I am not sure if it’s just a formatting issue with the post, but all 3 of the scripts you posted look to be missing the last line, where the actual addition takes place.

    The last script, which combines the two should look like this:

    The only difference I can see is that you’ve added a ; at the end of the last line, which is not required.

    Testing the setup here I can see the results are being returned as expected on a Chart and on a Watchlist.

    Ex3

    #65641
    Louis
    • Topics: 14
    • Replies: 21
    • Posts: 35

    Hi Matthew,

    Sorry about the script formatting error above. I just needed to hit enter to show V1 + V2 + V3 on the next line which you figured out.

    My script matches yours, but I still can’t get it to work. I tried a new watchlist, a new workbook, and also retyping the scripts. Perhaps the two screenshots attached will help you help me. It works as you have pictured in a Show View tool, but not on the watchlist? Thank you.

    #65655
    Louis
    • Topics: 14
    • Replies: 21
    • Posts: 35

    Got it! Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest