[mapguide-users] Numeric Search
Mark Hedges
hedgesm at cityofnorthlasvegas.com
Wed Aug 26 17:30:09 EDT 2009
Ok I want to thank Martin, Trian, Dave and Andy very very much. Both Dave
and Andy responded back at the same time with the golden code: ToString(FID)
LIKE '%$USER_VARIABLE%'. I wanted to thank you all for your help in getting
this to work. As you have probably noticed I am not too good yet with
advanced coding but I am trying. Now I have 1 more question that hopefully
someone will be able to help me with. The data that I am working with are
pipes, valves, hydrants, etc... Each feature has it's own data source and
also it's own FID. When I created my last search in MG Studio I wanted to
search for the FID. The problem however is that the expression builder only
lets me select one layer to search. For example if someone gave me an FID
to look up and I didn't know what type of feature it was I would spend alot
of time searching all the features to find it. What I would like to know is
how can I specify that I want to search for an FID within more than 1 layer?
Once again thank you all for your help, patience and assistance. I will try
to contribute to this board and help others as you have assisted me. Thanks
again.
Andy Morsell wrote:
>
> If you build the query with the expression builder in Autodesk Studio as
> part of a Fusion search widget, I can confirm that the following syntax
> works on my end with a numeric field (PRIMARYINDEX):
>
> ToString( PRIMARYINDEX ) LIKE '%$USER_VARIABLE%'
>
> Try stripping out all of the fields in your search results and only
> include
> the one you are searching on to see if that makes a difference.
>
> Andy Morsell, P.E.
> Spatial Integrators, Inc.
> 47° 46' N 116° 49' W
> www.SpatialGIS.com
>
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Mark Hedges
> Sent: Wednesday, August 26, 2009 1:40 PM
> To: dave.wilson at autodesk.com; mapguide-users at lists.osgeo.org
> Subject: SPAM-LOW: Re: [mapguide-users] Numeric Search
>
> Dave I tried your syntax and still end up with the "The character '$' is
> invalid.
> -----Original Message-----
> From: Dave Wilson <dave.wilson at autodesk.com>
> To: List, MapGuide Users Mail <mapguide-users at lists.osgeo.org>
>
> Sent: 8/26/2009 1:35:02 PM
> Subject: RE: [mapguide-users] Numeric Search
>
> correct me if I'm wrong, but shouldn't the full syntax be:
>
> ToString(FID) LIKE Concat(ToString($USER_VARIABLE), '%')
>
> Dave
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Martin
> Morrison
> Sent: Wednesday, August 26, 2009 2:32 PM
> To: MapGuide Users Mail List
> Subject: RE: [mapguide-users] Numeric Search
>
> Are you by chance using dotnet instead of php?
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Mark Hedges
> Sent: Wednesday, August 26, 2009 4:29 PM
> To: mapguide-users at lists.osgeo.org
> Subject: RE: [mapguide-users] Numeric Search
>
>
> Thank you for reply. I have tried this code along with several others and
> still no luck. This now gives me an invalid character error message for
> the
> $. I will keep trying.
>
> Traian Stanev wrote:
>>
>> Try something like:
>>
>>
>> FID LIKE Concat(ToString($USER_VARIABLE), '%')
>>
>>
>> Traian
>>
>>
>>> -----Original Message-----
>>> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-
>>> bounces at lists.osgeo.org] On Behalf Of Mark Hedges
>>> Sent: Wednesday, August 26, 2009 2:52 PM
>>> To: mapguide-users at lists.osgeo.org
>>> Subject: [mapguide-users] Numeric Search
>>>
>>>
>>> I have created several searches like PROJECT_TITLE LIKE
>>> '%$USER_VARIABLE%'
>>> which works great. The data in the Project_Title table is not Numeric.
>>> When I try to create a search for a Numeric field such as FID LIKE
>>> '%$USER_VARIABLE%' I get the following message: "Arguement types for
>>> operator 'LIKE' are mismatched. The validation operation expected
>>> 'Boolean'
>>> but the expression returned 'Unknown". It appears that I cannot use
>>> this
>>> expression on Numeric data. Any help would be greatly appreciated.
>>> --
>>> View this message in context: http://n2.nabble.com/Numeric-Search-
>>> tp3518680p3518680.html
>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>
> --
> View this message in context:
> http://n2.nabble.com/Numeric-Search-tp3518680p3519257.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://n2.nabble.com/Numeric-Search-tp3518680p3519640.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list