Dictionary issue

Hi Guys,

Im trying to add a dictionary action to ask for input on 6 questions, that i would like to insert at a placeholder in my daily note.

the error is something like “Failed: Get Dictionary Value, Shortcuts couldn’t convert Text to Dictionary”

anybody an idea maybe?

@czottmann Carlo, could you help me out perhaps? :slight_smile:

Hi @Dennis_Smit, welcome to the forum! Apologies for the silence but I had some family stuff to attend to, and it’s the Easter weekend… well.

Could you explain that issue in more detail, please, maybe provide me with a screenshot of the workflow so I get a better idea? I understand that you have 6 questions, which need to be answered, and the answers should replace their placeholders in a note. But why use a dictionary for that?

Carlo,

Hope your Ostern is very nice and cosy!

My flow is based upon a message on another forum, cant remember where …:slight_smile:



Wha i intend to do is basicly on work, private and overall ask for a number ona scale from 1 to 100, so i can replace them in my note in a progress bar. Besides that for all 3 categories i want a remark field to be replaced…

in my note:

Overall: %%Night-overall%%
%%uitleg-overall%%
Werk: %%Night-werk%%
%%uitleg-werk%%
Prive: %%Night-prive%%
%%uitleg-prive%%

Hope i did make my self clear and hope you could help me out,

Thanks, the screenshot helps, here’s the issue:

You’re trying to get a key not from the dictionary but from the key. The Repeat With Each loops over the dictionary keys. Then you store the Repeat Item (i.e., the key) in the var Placeholder, and then attempt to get the value from Placeholder which has no value as it’s just a text.

In summary, the last action in that screenshould should be set up like this: Get [Value] for [Placeholder] in [Dictionary].

Hope this helps!

Carlo,

After the inputs i get 6 dialogsboxes with the question “what is the placeholder”…?

That is because the Insert Text At Placeholder In Note’s parameters are still empty. Set Replacement to the result of the Get Value action above, and Placeholder to the variable Placeholder, that should do the trick unless I’m missing something obvious.

carlo, sorry for my noobness…:slight_smile: how can i call the variable thats the result of the get value action above? i tried value, but that one doesnt work…

sorry for my noobness…:slight_smile:

Never apologize for not knowing something yet! :wink:

how can i call the variable thats the result of the get value action above? i tried value, but that one doesnt work…

My bad, the result is called “Dictionary Value”, I should’ve been clearer. Here’s an annotated screenshot. If you’re on macOS, rightclicking a parameter will bring up all available variables so you can pick one.

I hope that makes it clearer. If not, let me know, and I’ll explain further :call_me_hand:t3:

Sidenote: Shortcuts is a bit weird and verbose at times but once you get the basic hang of it, it starts to make sense. :sweat_smile:

i adapted the shortcut like your example, but its still complaining about what placeholder it should fill…?

Ah yes. The problem sits in front of the Mac, i.e. MY Mac. I gave you the wrong screenshot before – apologies! The AFO action should look like this:

Insert text [var Answer] at the placeholder [var Placeholder] in the note …

Carlo,

would it be possible to have a videocall, the flow still asks for replacement…

I only do video calls as part of my (Shortcuts) consulting work or for conferences/ marketing, because that’s also how I make my money. :wink:

But tell you what: Export the workflow (Shortcuts → File → Export, make sure to mark it as “for anyone”) and send it over to carlo@actions.work. I’ll take a look, hopefully make it work, and send it back. Might take a day or two, though. Cool?

Update: Done, the issue was an empty parameter in one of the AFO actions.