You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jotformAPIClient.get_form_submissions() isn't using filterArray in a way in keeping with the docs. (also said docs incorrectly reference filter and orderby, instead of filterArray and order_by)
Result: The oldest 25 results in the "Approved" workflowStatus. (Note the difference in workflowStatus name. Is there some hidden naming going on behind the scenes?)
defget_submissions(api_key, set_form_ID, set_limit=100, set_debug=False):
# jotformAPIClient = jf.JotformAPIClient(api_key, debug=set_debug)# return jotformAPIClient.get_form_submissions(# formID=set_form_ID,# limit=set_limit,# filterArray={# "workflowStatus:eq":"In Progress",# },# order_by="created_at"# )url=f"https://api.jotform.com/form/{set_form_ID}/submissions?apiKey={api_key}&orderby[created_at]=desc&filter=\u007b%27workflowStatus:eq%27:%27In%20Progress%27\u007d&limit={set_limit}"req=urllib.request.Request(
url,
data=None,
# headers are required to avoid a 403headers={
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36"
},
)
data_json=json.loads(urllib.request.urlopen(req).read())
returndata_json["content"]
Result: The 100 most recent submissions in the "In Progress" workflowStatus. (The desired outcome)
EDIT: jokes, I just realized it's just the most recent submissions. sigh
The issue stems from the relatively recently exposed workflowStatus field not being in the current Python API Client. I had to edit their class so a project would work. Another thing I discovered is the status value filters need to be in uppercase.
jotformAPIClient.get_form_submissions()
isn't usingfilterArray
in a way in keeping with the docs. (also said docs incorrectly referencefilter
andorderby
, instead offilterArray
andorder_by
)Result: The 100 most recent submissions.
Result: None.
Result: The oldest 25 results in the "Approved"
workflowStatus
. (Note the difference inworkflowStatus
name. Is there some hidden naming going on behind the scenes?)Result: The 100 most recent submissions
in the "In Progress"workflowStatus
. (The desired outcome)EDIT: jokes, I just realized it's just the most recent submissions. sigh
Please reference this support ticket. The form I am working with is 220114796842154. https://www.jotform.com/answers/4751245-jotform-api-applying-filter-does-not-return-all-submissions/
The text was updated successfully, but these errors were encountered: