We are trying to filter the records in ajax entity field by comparing two fields one in entity A and One in Entity B that both use the same global list.
We tried the below condition example but couldnt get it to work we get an error saying the results could not be loaded .
We want to show the records in the ajax entity list that have matching items in the mulitselect dropdown lists
find_in_set([396],[377])>0
Query to compare fields for Ajax entity condition
- support
- Site Admin
- Posts: 6190
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Query to compare fields for Ajax entity condition
Both fields ([396],[377]) are mulitselect dropdown lists?
-
- Investor
- Posts: 417
- Joined: 19 Dec 2018, 02:33
- Name: Robert McDonald
- Location: Auckland, New Zealand
- Company Name: Unicloud
- Contact:
Re: Query to compare fields for Ajax entity condition
Hi yes they are
- support
- Site Admin
- Posts: 6190
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Query to compare fields for Ajax entity condition
Then query will be more complex, see an example:
Where 13 - is your list ID
In result you cont items from app_global_lists_choices where id in [396] and in [377]
Let me know if it works.
Code: Select all
(SELECT count(id) FROM app_global_lists_choices WHERE lists_id=13 and id in ([396]) and id in ([377]))>0
In result you cont items from app_global_lists_choices where id in [396] and in [377]
Let me know if it works.
-
- Investor
- Posts: 417
- Joined: 19 Dec 2018, 02:33
- Name: Robert McDonald
- Location: Auckland, New Zealand
- Company Name: Unicloud
- Contact:
Re: Query to compare fields for Ajax entity condition
Thanks that didnt seem to work - it is in the same application I just gave you access too entity 42 field [442] global list id is =2 and comparison fields are [599] and [1672]