Edition Lookup and Views

Is it possible to use an VIEW (mysql) as a source for an Edition Lookup?

I’m getting rows of data from a VIEW loaded into the drop down list but no data is displayed.

Re: Edition Lookup and Views

Yes, view is like a table. ScriptCase doesnt know if is view or table. The usability is the same.

The drop down is loaded with rows, but the rows are empty? Is what you mean?

Turn the debug mode on and see the sql executed.

The sql must be:

SELECT code, Description From table

The first field is the one that will be saved/manipulated and the second field is the on the wll be displayed.

Re: Edition Lookup and Views

My bad, Diogo. One the values from the view that I wanted to display contained a null. I had

concat_ws(’, ', {var1},{var2},{var3}) AS displayvalue
. {var2} was null, which nuked the displayvalue to null

For the benefit of anyone else who might get caught out on this, the fix is

concat_ws(’, ‘, {var1}, IF{var2}=NULL,’’,{var2}),{var3}) AS displayvalue

Re: Edition Lookup and Views

:slight_smile: