Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I have a button that I've configured in this way :
=Date( Max( {1<Compteur = {$(#=Only(Compteur))}>} Date ) )
I've checked the QV Help and the syntax seems to be fine. One detail, Compteur contains text eg. : "Disjoncteur Général"
Does somebody has any idea ?
Thank you
Hi, I think the problem is that Compteur is a string field and you are trying to cast the string to a number by using $(#=) the pound sign before the equal sign, hence the expression should work written like this:
=Date( Max( {1<Compteur = {'$(=Only(Compteur))'}>} Date ) )
Also rembember, the only function will return a value in the case that only one value is possible, otherwise it will return null.
Regards
Hi, I think the problem is that Compteur is a string field and you are trying to cast the string to a number by using $(#=) the pound sign before the equal sign, hence the expression should work written like this:
=Date( Max( {1<Compteur = {'$(=Only(Compteur))'}>} Date ) )
Also rembember, the only function will return a value in the case that only one value is possible, otherwise it will return null.
Regards
Does it work outside that search string box? In a text box for example?
You probably need quotes around the compteur:
=Date( Max( {1<Compteur = {'$(#=Only(Compteur))'}>} Date ) )
or
=Date( Max( {1<Compteur = {"$(#=Only(Compteur))"}>} Date ) )
Regards,
Erich
Thank you Ivan and Erich,
It works when I combined what you told me (without # and with " "):
=Date( Max( {1<Compteur = {"$(=Only(Compteur))"}>} Date ) )
Thank again guys !
Jeremy, just as a small suggestion, avoid using double quotes when possible, since it will invoke the qv search engine and it might have some performance implications. I always use single quotes, when I am filtering by a literal field value.
Regards
Good to know that Ivan!
Thanks!
Erich