M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 24
Registered: ‎05-11-2018

Filter acting inconsistently

Hi,

 

I have the following filter im my mobile shell.xaml

 

<Filter Id="PLAYGROUND_FILTER" Sql="PLAYGROUND = @{PLAYGROUND} AND INSPECTED_BY is NULL AND CURRENT_WEEK = DATEPART( wk, GETDATE())"/>

For some reason the filter is not working, If I remove the last part of the filter (AND CURRENT_WEEK = DATEPART( wk, GETDATE())), the filter will work as expected.

Aslo if I change the datepart query to a hardcoded value, it works. So if I replace DATEPART( wk, GETDATE()) with 27, the filter brings back the desired results.

 

I have this similar filter working in another mobile application:

 

<Filter Id="ASSIGNED_TO" Sql="ASSIGNED_TO = @{System.UserName} AND COMPLETE = 0 AND BI_WEEK = DATEPART( wk, GETDATE())/2" IsDefault="True"/>

There are no error logs being produced.

 

strangely the IsDefault="True" is not working for the first statement above!

 

How can I debug?

 

Ciaran