1
Solved

JavaScript(let) action doesn't see Takser variables with a number in the name

It shows only one alert box ("value"):-(

Task: JavaScriptlet_test

A1: Variable Set [
Name: %result
To: value
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]

A2: Variable Set [
Name: %result1
To: value1
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]

A3: JavaScriptlet [
Code: alert(result);
alert(result1);
Auto Exit: On
Timeout (Seconds): 45 ]

Tasker version 6.0.7-beta

1 reply

Hi! Can you please export that as an URI (not a link, but a direct URI) and paste it here so I can then import it and test it myself?

Thanks in advance!

A

taskertask://H4sIAAAAAAAAANWTwWuDMBjFz/WvkMBgPawxJuqkMTDYZbu295Hpx5A5W+JX//4lxhWH0g562ilf3u+RvDyI3OvuE8yzRh12piAkrPq6IIyE2Bck3USb7OEdUBMVrKTzDi60Q5zlTlzJstIIiqUJz+OIM8F5JKkXHYYpFumjYFxSOOO6UvYkSe3qtu0XqFfd611p6iM2gG976FBSpzt+NLVikb3ADU54KrE+tEMqXWJEwh4Kkg3JbLRDBSoRmc3jpkHbofFu8zG6OVF3BrpTY++xdGZjZ1uvmxNMTC8t/phia9JNQSJCZ4xfYOICS0bGF1g6MuaZpL6IhU7YbZ2wP5XC/lsr8UIrLM6vtqIbMHjvq1lvg+mWrbdXupoHjn8HXixIJLPXSOr+ogr86v+vCr4BnVWAhM0DAAA=

Thanks. 

The issue here is that %result1 is interpreted as a Javascript array, so you'll have to do something like use the Join function to see all the array values: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join

So, something like alert(result.join()) should work.

Hope this helps!

Topic is closed for comments