Can we add more than one key-value pair to dictionary using invoke method, I did try adding the second element and it gives me below error Error ERROR Validation Error ‘Dictionary`2’ does not have a public instance method named ‘Add’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke Method’. List_Ex_Demo.xaml
Below is my setup, Could somebody point me in the right direction.
Thanks for your response, Well actually Cant we achieve it without loops or datatable, As I understand we can add key value pairs to dictionary using
Add To Collection
Invoke Method -Add
But using the above methods cant we add more than one key-value pairs into the dictionary by passing all the pairs using just one method, for eg In invoke method or Add to collection parameters can we not add more than one parameter?
Thanks for your reply, it does makes sense, What confused me and still makes me think is the parameters section still allows us to key in more parameters when there is a limit for just for one key-value pair.
Unfortunately, parameter dialog doesn’t consider how many arguments can be set to the method. So, we need to set proper arguments from specification of the method.
Yeah I was able to do that, what I was trying to achieve was by trying to add keys and values using the parameters in add invoke method, which as Yoichi-san mentioned there is a limitation to add just one parameter.
It’s not a limitation but the Add is only allowed to accept one set of key value pairs as if required for multiple key value pairs we can loop through same function or look for alternative methods !