Tip: Call with multiple inputs
Just a tip regarding how calls with multiple variables can be implemented. In this example, we use the 'spirit' of key : value pairs to pass two variables containing strings and one variable containing a JSON record extracted from a table:
NoteResult = Call Process dbo.Notes Row ( MakeModel:%MakeModel%, Channel:%Channel%, %NoteRow%)
where
%MakeModel% is a string
%Channel% is a string
%NoteRow% is a JSON record extracted from a SQL table
To extract the data in the called Automation is really straight forward. Extract from %msg_body% as follows:
- Extract Field %MakeModel% contents by looking for key MakeModel: and extracting until the comma
- Extract Field %Channel% contents by looking for key Channel: and extracting until the comma
- Extract any field within %NoteRow% JSON 'Extract Field Json Path' and look for the key within the JSON
To pass multiple JSON records, assign each JSON to a key in the call, use a separator (some character that won't show up in the JSON record), extract each JSON and carry on extracting the fields.
- Iisedwinr @isedwinr
Just wanted to post this as a question!
I tried to set the variable to Call the automation with to JSON content but that did not work work so I will truy and do this now - MMark Carpenter @mark.carpenter
Super, happy it was helpful. I have more tips to post as time allows. If there's anything in particular, I'm happy to start building a list. For my propeller head TA is fun as well as being outstandingly useful so am happy to share what I've learned.