bedatadriven / activityinfo-R

ActivityInfo R Language Client
https://www.activityinfo.org/support/docs/R/
17 stars 12 forks source link

Form schema in `data.frame` format to pass into form schema functions #33

Open Ryo-N7 opened 1 year ago

Ryo-N7 commented 1 year ago

Update form schema in data.frame format and pass into the updateFormSchema() to update it. Not as much a priority as previous points as people can just get better at manipulating list objects but could be a useful functionality for all users not just AV.

Ryo-N7 commented 1 year ago

workflow:

  1. change form schema to df view
  2. which will let me use mutate() to modify field elements (change description, etc.)
  3. change back into list-format
  4. upload new form schema back into db with updateFormSchema()
nickdickinson commented 1 year ago

Even slightly neater but with a little more code (TBD) would be to have a custom class extending data.frame so that it is recognized as a form schema and could contain some additional metadata in attributes. This could be fed it directly to updateFormSchema() without an additional conversion step.