@cygnoir Btw, I've just had an idea for a workaround so you can update words_written
in Exist via the Workflow/Shortcuts app & I think it's going to work. I'll let you know when I've got the whole thing ready for you.
@cygnoir Btw, I've just had an idea for a workaround so you can update words_written
in Exist via the Workflow/Shortcuts app & I think it's going to work. I'll let you know when I've got the whole thing ready for you.
@cygnoir Done! Check out the Exist user forum for a couple of workflow links and explanation 😊
@cygnoir No problem! Glad I found a way to get it to work. Let me know if you get stuck or confused at all!
@belle I am stuck on figuring out how to modify the update workflow to send values for other days other than today.
@cygnoir Are you trying to set the date to something different, like yesterday, or make the workflow ask you to choose a date when you run it?
@belle I would like the workflow to ask me for the date (defaulting to today); I've done it with other workflows but I'm unfamiliar enough with this one not to know where to put the prompt.
@cygnoir Sure. So you just need to change the value that says Current date in this screenshot. Can you make that value ask for input?
@belle @cygnoir I would recommend adding a date action and setting it to Specified date and then "ask when run" - and getting that as a magic variable. The date would be like this: www.icloud.com/shortcuts...
@cygnoir Did it ask you for anything? I think if you delete the value "Current Date" and replace it with "ask for input", you should be able to choose "Date" as the input type. Does that part work?
@belle Rather, it asked me for the attribute, which I chose, and the amount, which I input, and then didn't ask me for the date.
@cygnoir Can you try adding a step near the beginning that asks for the date and uses "Set variable" to save it? Then put that variable for the date into the spot where "Current date" was in the original?
@cygnoir Sorry, I didn't add alert messages or anything for that. At the bottom of the Shortcut there should be a little text box showing output from the API, do you see that? It should say both success and failure, & if it worked, there'll be details after success but not after failure
@cygnoir You could also use Kirsty's example in that Exist user forum thread to add success and failure messages to it if you like.
@belle Oops, I ran the shortcut without opening it up, so I didn't see the text box. I will try again. I meant to ask how I view words_written in Exist.io itself.
@belle OK, now that I am running the shortcut correctly, I see in the text output for the Acquire shortcut: {"detail”:"Must supply a list of objects.”}
@cygnoir Ah sorry, my fault. It'll only work with multiple attributes. I'll update it to do just one.
@belle Getting closer! Now it’s saying bad date. {"failed":[{"error_code":"bad_date","value":750,"name":"words_written","error":"Invalid date","date":"Sep 21, 2018 at 12:00"}],"success":[]}
@cygnoir Ah, if you change the date, you need to keep the formatting the same. You want to choose ISO 8601
for the date and none
for the time.
@belle Ah, I had to add an additional Format Date step that wasn’t obvious before. Does this output mean it worked? {"failed":[],"success":[{"date":"2018-09-21","name":"words_written","value":750}]}
@belle Now I am going to be really bummed if my words_written totals don't correspond with higher mood. 😉
@cygnoir Haha let's hope they do! Did you end up setting up a workflow that just does words written, or do you choose from the list each time?
@belle I choose from the list each time. I would set it up to only update the words_written attribute, but I'm too nervous to change what's working.
@cygnoir Oh sure. I always duplicate shortcuts before editing stuff for the same reason! It's pretty simple to get it to work for just one, and you can even leave the unused stuff there. Where the dictionary is that has name, date, and value, just make the value for the name
key words_written
instead of having a variable in a bubble there.
@cygnoir I'm hoping to write up a post for the Exist blog about how these shortcuts work soon, so they're easier to understand and fiddle with.