logo

NJP

Flow Designer: Should I Use a String or Data Pill (record)?

Import · Jun 02, 2022 · video

[Music] [Applause] [Music] hey everyone it's justin thanks for watching in this video i'm going to talk about the difference between strings and records and when you're doing a flow in flow designer and the context here is i've set up integrations all the time i'm activating spokes as part of doing demos and stuff like that today i was working on setting up azure devops board spoke and you can see it there behind me um one of the things that you do well i do i should say for me is i go immediately test once i have set up my connections my credentials and stuff like that and i ran into this problem where i didn't think the spoke was working because i kept getting an error message when i went to look up the projects and azure azure devops so i was like hey um i figured my way around it i figured out what i was doing wrong but i was like you know people are going to run into this all the time i really like to share what what i've realized that i need to be thinking more about doing when i'm building these integrations so let's jump right to it if you look at what i've got set up here the first thing i was trying to do was get projects in azure devops you could get a list of them right so it prompts me here for a connection alias and i was left with a blank box and an ability to do either a script or go pick something using the data pill picker so let me put that back so you can see what that is so this is what the connection aliases inside uh the id of that connection aliases for this particular connection that i made now if you're still unsure should i use a string or show you something else uh you can go actually look at the actions that you're using right so you can go out to uh you can pull up the action in the spoke and you can see okay it's asking me for a connection alias and it's asking for a maximum project to import and if you look here it's kind of i'll zoom in on posts you can see it's asking for a string value so connection out connection alias string and that's how it behaves so let's go ahead i want to show you um what that looks like when i've ran that by itself so let's just test this we'll show you we'll select a requested item record here there we go number 36 we'll run it and by running this it's going to go through those actions and i'm going to show you the error message i got because it's helped set some context to to why i went down the path that i did that i'm going to get to in a second where i show actually how i got this to work so if i view the flow execution you can see i got an error message right it says unable to load connection with alias and what i put in there and here's the really misleading part look at this it says open connection alias this is a hyperlink if i click it it opens my connection alias and so it's like hey it knows it's there there's my connection alias it connects to my azure devops it's got everything i've double checked the personal access token everything so i was like huh why isn't this working it knows what that connection only is but then when it runs it says it's unable to load the connection alias with that alias id and the what i pasted in there so this happened a lot in flow designer where what i did is i hard-coded a string value and what i should have done was dropped in a data pill so if you look at the example just above that what i did ended up doing was i used the lookup record action and service go find that connection and credential alias and i'll set a condition on it to look for that same id that i was using in the string value just below in the action and wait for it to come up here the condition but while it's waiting to come up and then what i do there it is so you could see where i said hey the id is and there's the text that i was pasting into my azure devops action what that makes available to me if you look just above my head is this record data pill and so what i did on the one that worked is i just picked this up and drag it over into that field to use that connection and credential alias and if we uh look at that uh what that did before on the test in fact we don't even need to go to the test because i just ran it and it should have worked so let's go look at the executions for that one and just pulled up the last one we did where we got the error message if you look at the one there's the error message but if you look at one above it it was actually successful it pulled the projects from within my azure devops so even though this one down here failed where i hard coded it so my takeaway for you after this is if something's not working don't assume you set up the spoke wrong don't assume you did the integration wrong check it make sure if the if the action itself is looking for maybe a record a data pill instead of a string value uh when you're using it and uh and then you don't have to go do all that troubleshooting i probably spent a little bit too on troubleshooting but in the end it all ended up working and i'm gonna make for a great video uh showing azure devops integrations in a future video so i hope you found this information helpful if you did please like please subscribe or share it with somebody you think might be interested until next time i'll see you on the next one [Music] you

View original source

https://www.youtube.com/watch?v=dXtCYb6y8Ic