By jove, I think you've got it! Because sending multiple query parameters with
the same name creates an array, and here's what my docs say about 'get query
param':
***
If the item value is an array of multiple choices, the first multiple-choice
value is returned. Note that this behavior is different than using the syntax:
_query{"multiple_choice_value"} // returns longint
When using the collection indexing syntax, a reference to an array with no
index returns the array itself.
***
And it turns out that Active4D's 'num' command chokes when given an array. In
the case of accidental multiple query params, that isn't much worse than always
getting zero back from '_query{"id"}' and not knowing why.
Thank you Richard!
> On Nov 23, 2015, at 6:37 AM, Richard Carpenter <[email protected]> wrote:
>
> This happened to me when I accidentally sent in two query parameters with the
> same name.
> ________________________________________
> From: [email protected]
> <[email protected]> on behalf of Aparajita Fishman
> <[email protected]>
> Sent: Sunday, November 22, 2015 11:44 PM
> To: Active4D Developer Discussion List
> Subject: Re: [Active4d-dev] Errors that shouldn't be
>
> Very strange indeed. I seem to remember this happening to someone long ago.
> I'll take a look at my code and see if I can figure out any reason why this
> is happening.
>
>
>> On Nov 21, 2015, at 8:00 PM, Justin Will <[email protected]> wrote:
>>
>> So I went through the pages that were throwing errors and changed my code
>> from:
>>
>> _query{"param"}
>>
>> To
>>
>> get query param("param")
>>
>> and my errors have seemed to have stopped. I guess I am not certain why,
>> but I am happy that the errors are now gone.
>
> Regards,
>
> Aparajita
Regards,
Aparajita
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/