<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invalid operand to binary + in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23259#M269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, yeah I fixed it yesterday. Since I came from .Net and didn't know that I need to buildup the string with format before I pass it as a parameter. I've done almost the same thing as you did the code as follow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.parcelsQuery.where = [NSString stringWithFormat:@"Title_Lookup = '%@'", self.parcelsQuery.text = searchBar.text];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[parcelsQueryTask executeWithQuery:self.parcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Akhlaq Rao&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoSurfInc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try changing your code like this and see if it works..&lt;BR /&gt;&lt;BR /&gt; parcelsQuery = [AGSQuery query];&lt;BR /&gt; NSString *start = searchBar.text;&lt;BR /&gt; //int startValue = [start integerValue]; &lt;BR /&gt; //parcelsQuery.where = @"Title_Lookup = '" +startValue+ "'";&lt;BR /&gt; parcelsQuery.where = [@"Title_Lookup=" stringByAppendingString:start];&lt;BR /&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;BR /&gt; [parcelsQueryTask executeWithQueryarcelsQuery];&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jul 2010 11:20:42 GMT</pubDate>
    <dc:creator>AkhlaqRao</dc:creator>
    <dc:date>2010-07-16T11:20:42Z</dc:date>
    <item>
      <title>Invalid operand to binary +</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23257#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting this invalid operand to binary error when I am trying to pass Parcel ID from a text box casted into an integer. Although, I do not need to convert its cast into integer, but I am not sure how can I compare searchBar.text value with "Title_Lookup" fieldAliases?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; NSString *start = searchBar.text;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; int startValue = [start integerValue]; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.where = @"Title_Lookup = '" +startValue+ "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [parcelsQueryTask executeWithQuery:parcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [searchBar resignFirstResponder];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [AGSMapView showNetworkActivityIndicator:YES];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand this code (below) does not throw any exception nor the results?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.where = @"Title_Lookup = 'searchBar.text'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [parcelsQueryTask executeWithQuery:parcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [searchBar resignFirstResponder];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [AGSMapView showNetworkActivityIndicator:YES];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only this code (below) shows me the result, but I want to pass the Parcel ID dynamically right out of text box casted or without casted..any help will do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.where = @"Title_Lookup = '0022884928'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [parcelsQueryTask executeWithQuery:parcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [searchBar resignFirstResponder];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [AGSMapView showNetworkActivityIndicator:YES];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Akhlaq Rao&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoSurfInc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 20:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23257#M267</guid>
      <dc:creator>AkhlaqRao</dc:creator>
      <dc:date>2010-07-14T20:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid operand to binary +</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23258#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try changing your code like this and see if it works..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; NSString *start = searchBar.text;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; //int startValue = [start integerValue]; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; //parcelsQuery.where = @"Title_Lookup = '" +startValue+ "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.where = [@"Title_Lookup=" stringByAppendingString:start];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [parcelsQueryTask executeWithQueryarcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jul 2010 17:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23258#M268</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2010-07-15T17:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid operand to binary +</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23259#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, yeah I fixed it yesterday. Since I came from .Net and didn't know that I need to buildup the string with format before I pass it as a parameter. I've done almost the same thing as you did the code as follow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;parcelsQuery = [AGSQuery query];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.parcelsQuery.where = [NSString stringWithFormat:@"Title_Lookup = '%@'", self.parcelsQuery.text = searchBar.text];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[parcelsQueryTask executeWithQuery:self.parcelsQuery];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Akhlaq Rao&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoSurfInc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try changing your code like this and see if it works..&lt;BR /&gt;&lt;BR /&gt; parcelsQuery = [AGSQuery query];&lt;BR /&gt; NSString *start = searchBar.text;&lt;BR /&gt; //int startValue = [start integerValue]; &lt;BR /&gt; //parcelsQuery.where = @"Title_Lookup = '" +startValue+ "'";&lt;BR /&gt; parcelsQuery.where = [@"Title_Lookup=" stringByAppendingString:start];&lt;BR /&gt; parcelsQuery.outFields = [NSArray arrayWithObject:@"*"];&lt;BR /&gt; [parcelsQueryTask executeWithQueryarcelsQuery];&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jul 2010 11:20:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-operand-to-binary/m-p/23259#M269</guid>
      <dc:creator>AkhlaqRao</dc:creator>
      <dc:date>2010-07-16T11:20:42Z</dc:date>
    </item>
  </channel>
</rss>

