Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
jpacker
Contributor II
Contributor II

SugarCRM Filtering Records

Hello All,

I'm just trying to do a fairly basic filter of the Accounts module from SugarCRM. I've been following the guidance (SugarCRM | Qlik Connectors Help) along with Sugar's own (/Filters GET - Sugar Support) which has lead me to the below, but I keep getting a less than helpful error with the filter.

LET vToday = Date(Today(), 'YYYY-MM-DD');

SELECT *
FROM Accounts
WITH PROPERTIES (
max_num='200',
order_by='date_modified:DESC',
filter='date_modified$gte=$(vToday)',
fields=''
)

 

Appreciate any thoughts

Cheers

1 Solution

Accepted Solutions
diegozecchini
Specialist
Specialist

Hi!

try this

SELECT *
FROM Accounts
WITH PROPERTIES (
max_num='200',
order_by='date_modified:DESC',
filter='[{"date_modified": {"$gte": "$(vToday)"}}]',
fields=''
)

then check if vToday is formatted correctly. In Qlik, Date(Today(), 'YYYY-MM-DD') should work, but you might need to convert it explicitly to a string:

LET vToday = Date(Today(), 'YYYY-MM-DD');
However, try explicitly defining it as a string:
LET vToday = "'" & Date(Today(), 'YYYY-MM-DD') & "'";

View solution in original post

5 Replies
diegozecchini
Specialist
Specialist

Hi!

try this

SELECT *
FROM Accounts
WITH PROPERTIES (
max_num='200',
order_by='date_modified:DESC',
filter='[{"date_modified": {"$gte": "$(vToday)"}}]',
fields=''
)

then check if vToday is formatted correctly. In Qlik, Date(Today(), 'YYYY-MM-DD') should work, but you might need to convert it explicitly to a string:

LET vToday = Date(Today(), 'YYYY-MM-DD');
However, try explicitly defining it as a string:
LET vToday = "'" & Date(Today(), 'YYYY-MM-DD') & "'";

diegozecchini
Specialist
Specialist

my idea also is reviewing the filter. Try running the query without the filter parameter to confirm that data is being returned correctly. If the base query works, then you know the issue is with filtering.

jpacker
Contributor II
Contributor II
Author

Tried that thanks, runs beautifully without the filter

jpacker
Contributor II
Contributor II
Author

Sir, you are a gent and a scholar and I greatly appreciate your assistance

diegozecchini
Specialist
Specialist

cool, great. Glad to be helpful