I have a lookup project for markets and many of them are 1:1 with a single city. If someone chooses a market and there is only one city resulting, is there any way to autoselect that value instead of them manually having to select the single result from the dropdown? Is this a place where a Fusion scenario might be a better fit than an external lookup field?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Actually, @Sven-iX and @GregoryBu5 , I think I have noticed something lately - perhaps this has happened with a recent update. I am seeing behavior now that if the result of the external lookup query is a list, the list is shown in the dropdown, but if the result has a determinate, single value, that is shown in the field (even though the dropdown arrow is still there) and the field takes on the value immediately without selection. I tested it by adding a calculated field that only contains the external lookup field.
If the query results in a list, the calculated field waits until a selection is made to populate.
But if the query only pulls one result, both the external lookup field and the calculated field update without requiring selection!
This also works if you use a function like length() in your JSON path that results in a definite value - as in returning the number of results based on another field.
So it looks like this is now working as I had hoped it would!
You can't auto-populate a field based on the query returning a single result.
You definitely could let Fusion do that but what if there are 2 markets to the selected City?
How many Cities are in the dropdown and how many are 1:1 with a market?
A different approach could be to return the combined string City + Market in one external lookup.
I hear what you are saying, but I'm not sure that is what the OP intended. I have a situation right now - where I know I'm only going to get 1 result in the External Lookup. I don't want the user to have to "select" it to get it to display - I just want to display the value - once it's returned.
Can't this also be an "output" option - like the "multi select" options? Or is there another way to do this with the External Lookup?
Hey Greg - I get that; but if an external lookup is a single-select, it works like a normal dropdown - you still have to click the choice. (or maybe I'm still missing what you mean?)
Would be cool though if we could have a calculated field that can make the API call and just display the returned value.
Actually, @Sven-iX and @GregoryBu5 , I think I have noticed something lately - perhaps this has happened with a recent update. I am seeing behavior now that if the result of the external lookup query is a list, the list is shown in the dropdown, but if the result has a determinate, single value, that is shown in the field (even though the dropdown arrow is still there) and the field takes on the value immediately without selection. I tested it by adding a calculated field that only contains the external lookup field.
If the query results in a list, the calculated field waits until a selection is made to populate.
But if the query only pulls one result, both the external lookup field and the calculated field update without requiring selection!
This also works if you use a function like length() in your JSON path that results in a definite value - as in returning the number of results based on another field.
So it looks like this is now working as I had hoped it would!
Oh super - thank you for sharing!!
Views
Likes
Replies