Here:
“Search Dictionary” how? What do you mean?
You can search within a dictionary value using the Dictionary token in the Text option to that action.
Searching the entire dictionary would not make sense.
Would like to extract part of the value of a Dictionary key, to a new key:
In the example below, would like to know if there's a simpler way to extract just the first part of the text of Key1: "Value1Text1", and with this text, set dictionary Key2 to this value.
This example below works, just asking if there's a more straightforward way.
Thanks
Set Dictionary Value.kmmacros (4.8 KB)
Probably best to handle this with a loop through the keys. Have a generic search checking through key values won't really respond with useful info since you won't know which key it belonged to.
Here's ow I handle this scenario: For...Each loop on the Dictionary keys, regular expression match on the text of the dictionary key's value, assign that value to new key.
Oh, re-reading yours if you always want to use Key1 and aren't looping through a bunch of keys, then just do a Search on Text, then insert the value from the dictionary in the text field. It's the search text in macro below.
If instead of searching all key values you meant the drop down on Search should have a dictionary entry where you specify a dictionary name AND a key name and it searches the value of that one key, then yeah I can kind of see that. It's be like the Variable drop down but you would enter both the dictionary name and the key name.
Your request sounded like you wanted to search all keys and just get a matching value back.
Thanks for the visual example, it was of great help.
Yes, only search inside one key, Key1, and then insert part of the output to a different key, Key2.
Solved!
Yes, my request was exactly that but “not good” explained as yours. Glad to know I can use the Text search for now. Thanks again