Hi,
We are using the API search functionality to get jobs where a custom field has a specific value. This has been working for at least a year, but seems to have stopped working over the last few days/week.
This is the query we are using:
/companies/0/jobs/?Stage=in(Complete,Archived)&CustomFields.CustomField.ID=35&CustomFields.Value=Yes&columns=ID
The combination of CustomFields.CustomField.ID=35&CustomFields.Value=Yes was suggested in a previous post here to get it working in the first place.
If I query a specific job that it should return I can see the custom field ID and value match the filter but it's not returned in the above query.
[
{
"ID": 65125,
"CustomFields": [
{
"CustomField": {
"ID": 35,
"Name": "Approved",
"Type": "List",
"IsMandatory": false,
"ListItems": [
"Yes",
"No",
"Sent"
]
},
"Value": "Yes"
}
]
}
]
Any idea why this is no longer working?
Thanks,
Duncan
API search on custom field and value
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
API search on custom field and value
Confidence IT Ltd
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
-
SimproAPITeam
- Posts: 831
- Joined: Wed May 01, 2024 2:31 am
Re: API search on custom field and value
Hi Duncan,
We have identified an issue with the search when there are more than 30 custom fields on the project as an example.
Would this be the case in your instance?
Regards
We have identified an issue with the search when there are more than 30 custom fields on the project as an example.
Would this be the case in your instance?
Regards
Simpro API Team | Simpro Software Group
Re: API search on custom field and value
Hi,
Thanks for the suggestion. We have 21 custom fields in the "Leads, Quotes, Jobs & Recurring Custom Fields" section so that shouldn't be the issue for us.
Strangely it is working for some jobs, but not all. Is there a combination of custom field values that might impact it? We have several null values for instance, and various dates, lists, and text.
Thanks,
Duncan
Thanks for the suggestion. We have 21 custom fields in the "Leads, Quotes, Jobs & Recurring Custom Fields" section so that shouldn't be the issue for us.
Strangely it is working for some jobs, but not all. Is there a combination of custom field values that might impact it? We have several null values for instance, and various dates, lists, and text.
Thanks,
Duncan
Confidence IT Ltd
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
-
SimproAPITeam
- Posts: 831
- Joined: Wed May 01, 2024 2:31 am
Re: API search on custom field and value
Hi again,
I've recreated the test data that you mention and I was able to get the correct search results with the parameters you have included in your URL.
I would expect your query to work correctly. What results do you get, is it an empty array or an error message.
Double check your data and see how you go. If it's still not working send us a private message with your build details and specific examples of jobs you would expect in return and we can have a quick look.
Regards
I've recreated the test data that you mention and I was able to get the correct search results with the parameters you have included in your URL.
I would expect your query to work correctly. What results do you get, is it an empty array or an error message.
Double check your data and see how you go. If it's still not working send us a private message with your build details and specific examples of jobs you would expect in return and we can have a quick look.
Regards
Simpro API Team | Simpro Software Group
Re: API search on custom field and value
Thanks again for the reply. I've send a PM as requested.
Duncan
Duncan
Confidence IT Ltd
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
-
SimproAPITeam
- Posts: 831
- Joined: Wed May 01, 2024 2:31 am
Re: API search on custom field and value
Hi Duncan,
We have released an update that should solve the issues with custom fields. Please let us know if it's not working as expected for you.
Thank you!
Regards
We have released an update that should solve the issues with custom fields. Please let us know if it's not working as expected for you.
Thank you!
Regards
Simpro API Team | Simpro Software Group
Re: API search on custom field and value
Hi API team,
We're having this same issue again but I'm not certain when it started, possibly within the last few days. Can you check if the previous fix is still on our instance please?
Thanks,
Duncan
We're having this same issue again but I'm not certain when it started, possibly within the last few days. Can you check if the previous fix is still on our instance please?
Thanks,
Duncan
Confidence IT Ltd
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
https://confidenceit.co.uk
IT SUPPORT | TELECOMS | HOSTING | CYBER SECURITY | AUTOMATION
DEVELOPER CENTER