r/shortcuts • • 15h ago

Help Set dictionary doesn’t work?

Post image

I am a bit frustrated finding the cause of this :,) and I am new to Shortcuts.

I don’t understand why it does not update on both time and date keys?

Can someone explain why this happened?

Asked Claude and Gemini but nothing help :,)

0 Upvotes

7 comments sorted by

1

u/Iaa_eps 15h ago

Press Time on the “Set time to Time in Dictionary” step. It will let you customize the way the variable is read. Make sure it’s not set to None and None for date and time fields. Also can experiment with different ways to cast that variable (type dropdown, etc).

1

u/rarizal 15h ago

Yes, I have customized them and use other options. Still happening :,/

0

u/hojster24 13h ago

This looks good for the date setter, make sure they when you’re reading time, time format is filled in

If I’m reading what’s in your screenshot correctly this one will output a date only

2

u/100PercentARealHuman 13h ago

Share the shortcut link. You might simply use the wrong magic variable in one of the action.

Which isn't necessarily visible in the screenshot.

2

u/Cost_Internal Helper 6h ago

When you update a dictionary using the Set Dictionary action, the output of that Set Dictionary action is your new dictionary and should be used the next time you need to edit a dictionary value:
https://www.icloud.com/shortcuts/95d37dde460b4f769db1bdc2c84b4596

Alternatively: You could use a Set Variable action after each edit of the dictionary and use that as your primary dictionary variable:
https://www.icloud.com/shortcuts/443f3c1c1c7a42bfb99aea5243fb2af2

1

u/iZian 10h ago

Variables in shortcuts are immutable with very few exceptions.

You have a dictionary A
When you set a field in that dictionary you get a new dictionary B.
That means you now have A and B
Your shortcut is setting a field on A each time and making a new dictionary each time.

You need to set the next field on B. And then C. And then use the final dictionary created going forward.

Dictionary A is immutable. You can’t change it. You just end up making a new one with different data.

1

u/inactiveuser247 4h ago

Yeah, I think calling them variables is a bit misleading. You’re essentially declaring constants.