Create and update forms OR lookup tables via API

Hi guys, wondering if it’s possible to create new forms via the Application
Structure API. We’d like to be able to update forms based on changes to a
"group roster" in Salesforce, so that when new participants are added to a
group they show up in the CommCare form as a new question.

Alternatively, could this be achieved through the use of lookup tables and
can they be updated via API?

Taylor

We don’t have an API for updating forms in an app. Perhaps a better design
of the form would be to pull the list of groups from a lookup table which
is much easier to update dynamically than a form:
https://confluence.dimagi.com/display/commcarepublic/Setup+a+Question+with+Filtered+Choices

We don’t have an API for updating lookup tables either but it’s a much more
likely candidate.

··· On 28 April 2016 at 14:15, Taylor Downs wrote:

Hi guys, wondering if it’s possible to create new forms via the
Application Structure API. We’d like to be able to update forms based on
changes to a “group roster” in Salesforce, so that when new participants
are added to a group they show up in the CommCare form as a new question.

Alternatively, could this be achieved through the use of lookup tables and
can they be updated via API?

Taylor


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa

Simon, that’s a much better design, thank you! And +1 for updating lookup
tables via the API.

We’ve created a couple of types of cases (one for participants, another for
groups) and have forms to create new participants, update participants,
create new groups, and take attendance. The attendance form asks the
respondent to select a group, then filters the participants based on the
group they’re in. All the data will flow to Salesforce, and in the unlikely
event that new participants or groups are created in Salesforce, we’ll use
the submissions API to update cases via the “create participant” or “create
group” form. Only took a little while to suss out (and start to appreciate)
that you’re intentionally trying to limit POSTs to the form submission API.
Cases should only be aggregates of individual form submissions—nothing over
and above that gets written to on its own.

Feel free to correct my understanding of this if I’m way off base!

Taylor

··· On Friday, 29 April 2016 11:37:41 UTC+2, Simon Kelly wrote: > > We don't have an API for updating forms in an app. Perhaps a better design > of the form would be to pull the list of groups from a lookup table which > is much easier to update dynamically than a form: > https://confluence.dimagi.com/display/commcarepublic/Setup+a+Question+with+Filtered+Choices > > We don't have an API for updating lookup tables either but it's a much > more likely candidate. > > On 28 April 2016 at 14:15, Taylor Downs <downs....@gmail.com wrote: > >> Hi guys, wondering if it's possible to create new forms via the >> Application Structure API. We'd like to be able to update forms based on >> changes to a "group roster" in Salesforce, so that when new participants >> are added to a group they show up in the CommCare form as a new question. >> >> Alternatively, could this be achieved through the use of lookup tables >> and can they be updated via API? >> >> Taylor >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CommCare Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-developers+unsubscribe@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Simon Kelly > Senior Engineer | Dimagi South Africa >

Probably the best way to think about forms and cases is that forms are like
transactions on a case. They can create a case, update properties and close
a case. Forms themselves are (mostly) immutable. Cases can’t be modified
outside of a form submission (or form archive).

··· On 29 April 2016 at 13:58, Taylor Downs wrote:

Simon, that’s a much better design, thank you! And +1 for updating lookup
tables via the API.

We’ve created a couple of types of cases (one for participants, another
for groups) and have forms to create new participants, update participants,
create new groups, and take attendance. The attendance form asks the
respondent to select a group, then filters the participants based on the
group they’re in. All the data will flow to Salesforce, and in the unlikely
event that new participants or groups are created in Salesforce, we’ll use
the submissions API to update cases via the “create participant” or “create
group” form. Only took a little while to suss out (and start to appreciate)
that you’re intentionally trying to limit POSTs to the form submission API.
Cases should only be aggregates of individual form submissions—nothing over
and above that gets written to on its own.

Feel free to correct my understanding of this if I’m way off base!

Taylor

On Friday, 29 April 2016 11:37:41 UTC+2, Simon Kelly wrote:

We don’t have an API for updating forms in an app. Perhaps a better
design of the form would be to pull the list of groups from a lookup table
which is much easier to update dynamically than a form:
https://confluence.dimagi.com/display/commcarepublic/Setup+a+Question+with+Filtered+Choices

We don’t have an API for updating lookup tables either but it’s a much
more likely candidate.

On 28 April 2016 at 14:15, Taylor Downs downs....@gmail.com wrote:

Hi guys, wondering if it’s possible to create new forms via the
Application Structure API. We’d like to be able to update forms based on
changes to a “group roster” in Salesforce, so that when new participants
are added to a group they show up in the CommCare form as a new question.

Alternatively, could this be achieved through the use of lookup tables
and can they be updated via API?

Taylor


You received this message because you are subscribed to the Google
Groups “CommCare Developers” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa

Hey Taylor,

There’s actually an API for Lookup Tables
https://confluence.dimagi.com/display/commcarepublic/Fixture+Data
https://confluence.dimagi.com/display/commcarepublic/Bulk+upload+Lookup+Tables

Thanks,
Sheel

··· On Fri, Apr 29, 2016 at 9:22 AM, Simon Kelly wrote:

Probably the best way to think about forms and cases is that forms are
like transactions on a case. They can create a case, update properties and
close a case. Forms themselves are (mostly) immutable. Cases can’t be
modified outside of a form submission (or form archive).

On 29 April 2016 at 13:58, Taylor Downs downs.taylor@gmail.com wrote:

Simon, that’s a much better design, thank you! And +1 for updating lookup
tables via the API.

We’ve created a couple of types of cases (one for participants, another
for groups) and have forms to create new participants, update participants,
create new groups, and take attendance. The attendance form asks the
respondent to select a group, then filters the participants based on the
group they’re in. All the data will flow to Salesforce, and in the unlikely
event that new participants or groups are created in Salesforce, we’ll use
the submissions API to update cases via the “create participant” or “create
group” form. Only took a little while to suss out (and start to appreciate)
that you’re intentionally trying to limit POSTs to the form submission API.
Cases should only be aggregates of individual form submissions—nothing over
and above that gets written to on its own.

Feel free to correct my understanding of this if I’m way off base!

Taylor

On Friday, 29 April 2016 11:37:41 UTC+2, Simon Kelly wrote:

We don’t have an API for updating forms in an app. Perhaps a better
design of the form would be to pull the list of groups from a lookup table
which is much easier to update dynamically than a form:
https://confluence.dimagi.com/display/commcarepublic/Setup+a+Question+with+Filtered+Choices

We don’t have an API for updating lookup tables either but it’s a much
more likely candidate.

On 28 April 2016 at 14:15, Taylor Downs downs....@gmail.com wrote:

Hi guys, wondering if it’s possible to create new forms via the
Application Structure API. We’d like to be able to update forms based on
changes to a “group roster” in Salesforce, so that when new participants
are added to a group they show up in the CommCare form as a new question.

Alternatively, could this be achieved through the use of lookup tables
and can they be updated via API?

Taylor


You received this message because you are subscribed to the Google
Groups “CommCare Developers” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Thank you, Sheel.

··· On 04/29/2016 05:14 PM, Sheel Shah wrote: > Hey Taylor, > > There's actually an API for Lookup Tables > https://confluence.dimagi.com/display/commcarepublic/Fixture+Data > https://confluence.dimagi.com/display/commcarepublic/Bulk+upload+Lookup+Tables > > Thanks, > Sheel > > On Fri, Apr 29, 2016 at 9:22 AM, Simon Kelly <skelly@dimagi.com > wrote: > > Probably the best way to think about forms and cases is that forms > are like transactions on a case. They can create a case, update > properties and close a case. Forms themselves are (mostly) > immutable. Cases can't be modified outside of a form submission > (or form archive). > > On 29 April 2016 at 13:58, Taylor Downs <downs.taylor@gmail.com > wrote: > > Simon, that's a much better design, thank you! And +1 for > updating lookup tables via the API. > > We've created a couple of types of cases (one for > participants, another for groups) and have forms to create new > participants, update participants, create new groups, and take > attendance. The attendance form asks the respondent to select > a group, then filters the participants based on the group > they're in. All the data will flow to Salesforce, and in the > unlikely event that new participants or groups are created in > Salesforce, we'll use the submissions API to update cases via > the "create participant" or "create group" form. Only took a > little while to suss out (and start to appreciate) that you're > intentionally trying to limit POSTs to the form submission > API. Cases should only be aggregates of individual form > submissions—nothing over and above that gets written to on its > own. > > Feel free to correct my understanding of this if I'm way off base! > > Taylor > > > > On Friday, 29 April 2016 11:37:41 UTC+2, Simon Kelly wrote: > > We don't have an API for updating forms in an app. Perhaps > a better design of the form would be to pull the list of > groups from a lookup table which is much easier to update > dynamically than a form: > https://confluence.dimagi.com/display/commcarepublic/Setup+a+Question+with+Filtered+Choices > > > We don't have an API for updating lookup tables either but > it's a much more likely candidate. > > On 28 April 2016 at 14:15, Taylor Downs wrote: > > Hi guys, wondering if it's possible to create new > forms via the Application Structure API. We'd like to > be able to update forms based on changes to a "group > roster" in Salesforce, so that when new participants > are added to a group they show up in the CommCare form > as a new question. > > Alternatively, could this be achieved through the use > of lookup tables and can they be updated via API? > > Taylor > -- > > --- > You received this message because you are subscribed > to the Google Groups "CommCare Developers" group. > To unsubscribe from this group and stop receiving > emails from it, send an email to > commcare-developers+unsubscribe@googlegroups.com. > For more options, visit > https://groups.google.com/d/optout. > > > > > -- > Simon Kelly > Senior Engineer | Dimagi South Africa > > -- > > --- > You received this message because you are subscribed to the > Google Groups "CommCare Developers" group. > To unsubscribe from this group and stop receiving emails from > it, send an email to > commcare-developers+unsubscribe@googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > > > > -- > Simon Kelly > Senior Engineer | Dimagi South Africa > -- > > --- > You received this message because you are subscribed to the Google > Groups "CommCare Developers" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to commcare-developers+unsubscribe@googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > > > > -- > Sheel Shah > Project Manager | Dimagi > m: +1.781.428.5419 | skype: sheel_shah > > > -- > > --- > You received this message because you are subscribed to a topic in the > Google Groups "CommCare Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/commcare-developers/iy5LATF-AO0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > commcare-developers+unsubscribe@googlegroups.com > . > For more options, visit https://groups.google.com/d/optout.