In iPaaS, can we return a table of data from a flow to a form and update elements on the form based on table data?
We are wondering if we can return a table of data form an iPaaS flow to a form, and then, based on different cells in the table, set different conditions? What we're thinking through is how to have a few different data items be returned to a form based on an asset lookup, something like Make/Model/Purchase Date. When the data is returned, have different labels update based on the specific cells in the table. For example, a label for computer model would be updated with the computer model item in the property from the table. Otherwise, I assume we'll have to have multiple small flows to pull back each item we need updated.
I saw in some of the webinars about forms, the ability to populate a combo box with data and it is mentioned in the KB as well but there is no mention on first, how to pull back multiple lines of data and if you can only do that with an element that accepts multiple lines, such as a combo box. I've tried returning a table of data, with no luck.
Answer (1)
Hello Jason,
I asked our iPaaS folks about this and they advised yes, you could do this but it's a little complex. The idea is, you'd populate a field with something like an asset ID, thereby looking it up. Then, you'd have multiple fields all call the same iPaaS flow, but populate their choices or something with a different set of results. Thing is, you currently can't specify "only populate the choices with this set of results". When the flow runs, and you say "set the choices on this field with the results of this flow", it's ALL the results, not just "the results of this SECTION of the flow". I'm going to submit an enhancement for that.
You can get around this by using the "_LastChangedField" (or whatever it's called) item in the form. So, if the _LastChangedField is "Product Type", that means the user just update the product type, and the next thing that needs to load is the product models. Therefore, when the flow sees the _LastChangedField is product TYPE, the flow can return just the product MODELS. That's how you can get the flow to sort of selectively respond with what you need next
TL;DR: whenever possible, it's easier to use a separate flow to get just the thing you want for a specific field in a form. If you need to, though, you can use the _LastChangedField element of the flow input (from the form) to figure out what just changed, and therefore what's needed.
The iPaaS folks also made this recording explaining this concept: https://www.screencast.com/t/CAduhUwD
Sincerely,
Mark Sayers
Sr Support Consultant, CS