M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 14
Registered: ‎10-17-2016
Accepted Solution

Using wildcard in predefined query in Mapp enterprise deskop

 

I want to use a wildcard in a predefined query in the desktop app of mapp enterprise.

 

In de definition I used the following statement:

 

select a.gid , a.perceelcod from percelenschouwtmp a where perceelcod like {ENTITY.perceelcod%}

 

The syntax I got from this example in the administrator guide of Smartclient:

SELECT ID, KG, GSTNR, AREA FROM GST WHERE KG LIKE {ENTITY.Kg%}

 

However  I do not get any results. . 

 

If I look into the log file of postgis I see the following log statement:

 

 

execute <unnamed>: select a.gid , a.perceelcod from percelenschouwtmp a where perceelcod like $1
2019-12-17 09:42:06.345 CET [9772] DETAIL: parameters: $1 = 'select a.gid , a.perceelcod from percelenschouwtmp a where perceelcod like @perceelcod%'

 

The place holder structure is completly messed up. 

 

What is the proper syntax of usiga place holder when defining a query in the desktop of Mapp enterprise?

 

Thanks

 

Tjip

Highlighted
Technical Evangelist
Posts: 774
Registered: ‎11-12-2015

Re: Using wildcard in predefined query in Mapp enterprise deskop

Hi tjip,

 

Please add one more '%' to beginning of the attribute.

 

For your example it will look like this:

select a.gid , a.perceelcod from percelenschouwtmp a where perceelcod like {ENTITY.%perceelcod%}

 

HTH

Highlighted
Occasional Contributor
Posts: 14
Registered: ‎10-17-2016

Re: Using wildcard in predefined query in Mapp enterprise deskop

Thanks

 

It works!