Select to view content in your preferred language

Search Widget Expressions

1645
4
Jump to solution
03-18-2014 07:50 AM
WalterDziuba
Deactivated User
Is there a definitive reference manual that describes how to use the expression builder when you're trying to use
the search widget?

As an example, I'm trying to get this to run, but I keep getting a yellow triangle with an exclamation point indicating something is wrong with my expression.

BUILDINGTYPE like '[Apartment]'

Walter
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Walter,

your expression should look like this:

BUILDINGTYPE like '[value]%'


The widget will always replace the [value] with what the user types in the input box.

When using a like expression you normally will want to specify a wild character such as the % symbol.

As far as a manual you knowing what to type... No there is not one. It is just basic SQL query syntax.

From the documentation:
Tip:'[value]'  is a literal value that needs to be specified in the expression. The  apostrophe's are needed if working with string values.


View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Walter,

your expression should look like this:

BUILDINGTYPE like '[value]%'


The widget will always replace the [value] with what the user types in the input box.

When using a like expression you normally will want to specify a wild character such as the % symbol.

As far as a manual you knowing what to type... No there is not one. It is just basic SQL query syntax.

From the documentation:
Tip:'[value]'  is a literal value that needs to be specified in the expression. The  apostrophe's are needed if working with string values.


0 Kudos
WalterDziuba
Deactivated User
Robert,

That's great thanks. But if you wanted to preset the value:

So rather than have a value that the client has to input, then could I not use this to find bulding types that have attribute values of "Appartment"

BUILDINGTYPE like '[Apartment]%'

Walter
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Walter,

  Sure just do not use the square brackets: App builder will continue to give you a warning (I think) but you can just ignore it.

BUILDINGTYPE like 'Apartment%'
0 Kudos
WalterDziuba
Deactivated User
Robert,

Didn't realize that my BUILDINGTYPE was a domain with only coded values. So to use the word "Apartment" made no sense to Flex. But when I changed the value to "2" which equals Apartments, it worked like a charm.

Thanks again.....Walter
0 Kudos