Here you can see 2 routes. One is to create a new company, the other is if the company exists already.
What I would want ideally is to use the new company ID I get when creating a new company. That is IF the above route executes at all. If it doesn’t I just want to use the company ID i get from my main path response. If that would be possible I wouldn’t need to have duplicate modules that check and create persons in both routes, since these modules are doing the same.
It already works like this but it is bugging me because there has to be a cleaner solution right?
Welcome to the Make community!
To do this, you can use the built-in function ifempty
—
{{ ifempty(value1; value2) }}
For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.
2 Likes
Thank you very much samliew.
1 Like