The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API to find group submissions ?
i'll try to make sense with my poor english writing,

i have been using FT1 to make electronic booklets to gather data for a medical study.
each ward had a username, was entering its patients, and could find them with a mysql query that looked for that username.
they had a list of 10 submissions and could return to the forms for each patient at anytime and either complete it or modify some data. the data was injected in the same table FT used for that particular form.
FT was very useful to centralise the data and make queries.

as i'm preparing a new study, i wonder if there is a way to use the api to refill forms better than using a mysql query


Hi Alex,

Thanks for the post!

The API actually doesn't have functions for retrieving the raw submission data yet (but it will!), but you can always require() the /global/library.php file and use the core's ft_get_submission_info function - that does what you need. You can find it in /global/code/submissions.php.

But instead, couldn't you do this? (I'm not 100% sure if it fits your needs):
1. create client accounts for each of the wards.
2. create a separate View for each ward. Each View would limit the results to only show submissions within that particular ward. (As such, you will need a "ward" field to be added to your forms in case they don't already have it).
3. Assign each ward to a particular View.

With this in place, they can then log in and update their patient information without seeing any other patients in any other ward.

Would that work, do you think?

- Ben
thanks for your reply

this wouldn't fit my needs as doctors are very tech unwise and need a very explicit interface to see their data

i will look into the libraries,

but the main part of my question was : is there a way to select some submissions according to different criterion, sort them and then access to the data.
maybe it is easier to do it as i used to by using a mysql query

Yeah, it sounds like perhaps a custom query might be the best thing for now...

Sorry I couldn't be more help.

- Ben
having formtools developed and released to us seems like more than enough help to me.

it's a great tool Smile

thank you!

(Apr 23rd, 2009, 9:57 PM)Ben Wrote: Sorry I couldn't be more help.

Forum Jump:

Users browsing this thread: 1 Guest(s)