I am having exactly the same problem. I am trying to use an if statement to manage flow based on a dictionary value stored as a number. I am only getting the exists or doesn’t exist options when I want to determine if the value exceeds zero. Very frustrating and this does not seem to be expected behavior.
I am using 13.1.2. My dictionary has several entries, some are strings and some are numbers. The number key:value pair is the one not showing all the options under an if statement. I’m not sure how to change the variable type in a dictionary after creating it, but I did make a new number entry in the dictionary and had the same problem in which only has value/doesn’t have value are available under the if statement.
The shortcut doesn’t see into the dictionary which is why you type the key. The content of the dictionary key value pairs can be dynamically modified or even inferred.
When the IF comes to reference the key value pair, it doesn’t know what type of data it is supposed to be. As a result it has the most limited of checks.
When you first pull the value into a particular data type such as a text action or number action, you are effectively casting the data into a particular data type and at that point Shortcuts is able to assign a wider range of conditions to check for.
From a technical perspective, this is good. From a practical perspective, the option to specify the data type on the retrieval of the value would remove the need for the additional ‘casting’ step.
Tap the Dictionary Value magic variable that’s on the If action. In there, tap the link/buttons that says as Text. Then keep it as Text and tap Done. You should get more conditions in your If action.
Okay so you are using it on an individual item within an individual dictionary item rather than the dictionary example from your original screenshot. I think my point still stands