Lasso 8.6, inline search on date field, error 500

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso 8.6, inline search on date field, error 500

Yescas, Alejandro
Hello Lasso Developers,

I’m using lasso 8.6 and filemaker server.

I have a field called “MeetingDate” and I”m trying to perform a search on the date field via an inline, but I keep getting an error 500:

An error has occurred. ( 500 Error while performing FileMaker database -search action. Date value does not meet validation entry options. ) No Records Found

I can’t figure out how to format the date field to perform the find…any feedback back is greatly appreciated.  thank you.

Alex









#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

maxwellk2
Can you provide the inline code?

Here's an old post I made that might address the issue:

        http://www.lassotalk.com/Re-Can-I-use-Lasso-8-5-with-FileMaker-Server-12.lasso?273303

Basically...

> A couple of things I found with Lasso 8.6 after recently switching from FMS11 to FMS12, which might also apply when using Lasso 8.5….
>
> Date searches appear to require the -Operator tag to work at all, and search performance drastically improves when inserting -Operator='EQ' in front of name/value pairs.
>
> For example in both cases, this…
>
>         Inline(-Search, -Database='database', -Table='table', 'date_field'=#date_to_find);
>         /Inline;
>
> …becomes this…
>
>         Inline(-Search, -Database='database', -Table='table',-Operator='EQ', 'date_field'=#date_local);
>         /Inline;
>
> The same inline in FMS11 would work fine, and respond relatively quickly, but in FMS12 -Operator is required for date search and boost performance otherwise. Of course, EQ may not always be the desired action, but in cases where EQ is desired, we're seeing a massive improvement in response times from FMS12 when it's explicitly provided in the inline.
>
> I believe the default -Operator action is BW (begins with) when -Operator is not provided, so it appears FMS12 is much faster at EQ (equals) searches.
>
> -Max








> On May 27, 2016, at 2:36 PM, Yescas, Alejandro <[hidden email]> wrote:
>
> Hello Lasso Developers,
>
> I’m using lasso 8.6 and filemaker server.
>
> I have a field called “MeetingDate” and I”m trying to perform a search on the date field via an inline, but I keep getting an error 500:
>
> An error has occurred. ( 500 Error while performing FileMaker database -search action. Date value does not meet validation entry options. ) No Records Found
>
> I can’t figure out how to format the date field to perform the find…any feedback back is greatly appreciated.  thank you.
>
> Alex

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Lasso 8.6, inline search on date field, error 500

Yescas, Alejandro
In reply to this post by Yescas, Alejandro
Thank you Max,

Here is my basic inline:

[Inline: -Search,
-Database=‘xxx',
-Table=‘xxx',
-Operator='EQ',
'Interpretation_Request::MeetingDate'='Interpretation_Request::MeetingDate',
-KeyField='',
-Show]















#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Lasso 8.6, inline search on date field, error 500

Yescas, Alejandro
In reply to this post by Yescas, Alejandro
I also tried adding the following and still getting the error:


[var: 'DOM' =
(date:(action_param:'Interpretation_Request::MeetingDate'),
-format='%d/%m/%Y')]


[Inline: -Search,
-Database=‘xxx',
-Table=‘xxx',
-Operator='EQ',
'Interpretation_Request::MeetingDate'=$DOM,
-KeyField='',
-Show]





#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

Jason Pettis-2
Alejandro,
Have you confirmed the field type in FM is "date" and not some other
format? Have you confirmed that the value in the action param is a date? Is
the variable $DOM formatted in the way you expect?

-Jason Pettis

On Sat, May 28, 2016 at 9:46 AM, Yescas, Alejandro <
[hidden email]> wrote:

> I also tried adding the following and still getting the error:
>
>
> [var: 'DOM' =
> (date:(action_param:'Interpretation_Request::MeetingDate'),
> -format='%d/%m/%Y')]
>
>
> [Inline: -Search,
> -Database=‘xxx',
> -Table=‘xxx',
> -Operator='EQ',
> 'Interpretation_Request::MeetingDate'=$DOM,
> -KeyField='',
> -Show]
>
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

Yescas, Alejandro
In reply to this post by Yescas, Alejandro
Hi Jason,

100 percent sure the field is a date field without any validation on the fms-server.

If my field name is:

[ Field: Interpretation_Request::MeetingDate’]

How do you apply the date_format, can’t seem to get it right.

 [Inline: -Search,
> -Database=xxx',
> -Table=xxx',
> -Operator='EQ',
> 'Interpretation_Request::MeetingDate’=Interpretation_Request::MeetingDate’,
> -KeyField='',
> -Show]

Thanks.


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

maxwellk2
In reply to this post by Yescas, Alejandro
Like Jason suggested you should output the value of $DOM and check it matches the date format in your Interpretation_Request::MeetingDate field. Here's some date search code that I know works, maybe start with that:

        inline( -search, -database = 'acb', -table = 'def', -op = 'eq', 'my_date_field' = date_format( date, -format = '%D' ) );
        /inline;

However, you're calling both the -Search and -Show action tags, try removing the -Show.

Also, there is a bug in Lasso 8.6 and FMS12+. I see you're calling a related field, which is fine, however, Lasso 8.6 has issues when there is both a field AND a portal (with fields) with the same relationship on the same layout. Try removing all portals on the layout, test the code, then retest as you replace the portals one at a time.

-Max


> On May 28, 2016, at 8:46 AM, Yescas, Alejandro <[hidden email]> wrote:
>
> I also tried adding the following and still getting the error:
>
>
> [var: 'DOM' =
> (date:(action_param:'Interpretation_Request::MeetingDate'),
> -format='%d/%m/%Y')]
>
>
> [Inline: -Search,
> -Database=‘xxx',
> -Table=‘xxx',
> -Operator='EQ',
> 'Interpretation_Request::MeetingDate'=$DOM,
> -KeyField='',
> -Show]




#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Lasso 8.6, inline search on date field, error 500

Yescas, Alejandro
In reply to this post by Yescas, Alejandro
Thanks Max,

I updated the inline to the following and I’m still getting that damn error.  Is the input


[
Inline(
-Search,
-Database=‘xxx',
-Table=‘xxx',
-op = 'eq',
'Interpretation_Request::MeetingDate'=
date_format( date, -format = '%D'));
]


Do I need to apply the date_format on the input field also?

"[Field: 'Interpretation_Request::MeetingDate']”









#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

Jason Pettis-2
In your earlier example, you were trying to apply date_format an
action_param value. What is the "name" on the element passing that param?
Is it really "Interpretation_Request::MeetingDate"?

You should try to do some checking on your action page. I would suggest you
include the following and check the output:

<?LassoScript

action_params; // check all values coming into the page
var('DOM' = date(action_param('Interpretation_Request::MeetingDate')) ->
format('%D')); // the action_param "name" should match an "element" name
'<br />DOM: ' + $DOM; // what's the value in the DOM variable

Inline(-Search,
-Database=‘xxx',
-Table=‘xxx',
-Operator='EQ',
'Interpretation_Request::MeetingDate'=$DOM);
error_currentError; // output the error here
/inline;
?>

This will allow you to see what is coming into the page, how the variable
is being set, and what error is coming off the inline.

-Jason


On Sat, May 28, 2016 at 12:28 PM, Yescas, Alejandro <
[hidden email]> wrote:

> Thanks Max,
>
> I updated the inline to the following and I’m still getting that damn
> error.  Is the input
>
>
> [
> Inline(
> -Search,
> -Database=‘xxx',
> -Table=‘xxx',
> -op = 'eq',
> 'Interpretation_Request::MeetingDate'=
> date_format( date, -format = '%D'));
> ]
>
>
> Do I need to apply the date_format on the input field also?
>
> "[Field: 'Interpretation_Request::MeetingDate']”
>
>
>
>
>
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.6, inline search on date field, error 500

maxwellk2
In reply to this post by Yescas, Alejandro
No, you wouldn't apply the date_format on the input field.

Not sure what else to suggest. Maybe start with simpler inlines and confirm you're seeing the expect format in your field. Also, create a new table/layout that only has the minimal fields needed and use that for the inline.

[
Inline(
-Random,
-Database=‘xxx',
-Table=‘xxx'
);

field('Interpretation_Request::MeetingDate');

/inline;
]


> On May 28, 2016, at 11:28 AM, Yescas, Alejandro <[hidden email]> wrote:
>
> Thanks Max,
>
> I updated the inline to the following and I’m still getting that damn error.  Is the input
>
>
> [
> Inline(
> -Search,
> -Database=‘xxx',
> -Table=‘xxx',
> -op = 'eq',
> 'Interpretation_Request::MeetingDate'=
> date_format( date, -format = '%D'));
> ]
>
>
> Do I need to apply the date_format on the input field also?
>
> "[Field: 'Interpretation_Request::MeetingDate']”
>
>
>
>
>
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>