Open [Help] AutoWeb AutoTools Dark Sky API - How to handle empty strings in array?

Discussion in 'Tasker' started by stiw47, Feb 7, 2020.

  1. stiw47

    stiw47 New Member

    Nov 29, 2017
    Likes Received:
    Hi guys. I made a task to pull all hourly data from Dark Sky API and display it in KLWP (files attached). It should display all 48 rows for next 48 hours. The problem is with %preciptype() array, cause if %precipprobability(x) is equal to zero, then Dark Sky is not sending data for %preciptype(x) at all. What we can see currently on KLWP screenshot, it is only %precipprobability() in 4th column. Actually, Dark Sky is sending %precipprobability() in decimal numbers from 0 to 1 (e.g. 0.05 0.08 for small chance for precip and 0.85 0.92 for big chance), but on screenshot we can see my AutoTools Text Replacement regex to display it as text. I know I can stop here and be happy with this column :) but I would like to append %preciptype() for rows where data exist. I was try with this guide here: but it is not working for such a case, cause we have 48 rows for all other data except for %preciptype().

    Is there any way I can set any value for empty rows, so I can handle it afterwards?

    Btw, @joaomgcd : thanks for all great apps.

    P.S. Don't pay attention on right half of widget and visual part at all - this is still WIP :)

    Attached Files:

Share This Page