Portal can’t resolve ifnull function while in the argument of the function has queries with single quote, it will be easier to understand with the following example:
Ifnull: function ifnull called with 1 arguments
This is a function run on TDM Portal (a simplified version), as seen the Validation gives the reported problem, the same expression without the ifnull function works correctly.
The problem is that in GT Datamaker the expression works both with the ifnull function and without it.
4.11.x
Limitation of TDM Portal
Instead of using single quote inside single quote use single quote inside double quote.
That will fix the problem.
For example
@ifnull(@lov(@sqllist(P, select case when 1=1 then "@randlov(0,@sqllist(P, select address from hotels where name= 'Girsby')@)@" else 'E' end from cities)@,1)@,E)@