Summary

This Scripts Library is meant to be a reference for designers building studies/applications on the Fountayn clinical research platform. This is meant to be a comprehensive help reference to guide and assist the designer in adding functionality to their application. Questions not answered within this help reference should be directed to the Solution Center. 


A lot of questions have been asked since our scripting language was released. We’ve compiled the majority of these in the FAQ Scripts section and we encourage you to read those if you get stuck on a particular item.


Best Practices

  1. When generating portions of a casebook, it is advisable to group portions of a casebook under a parent form.
    1. Example: You have 20 visits in a study. The site user should only see 5 visits before inserting the next 5. You could insert visit 1, visit 2, then visit 3, etc. seperately. However, using many back to back createform scripts will cause a lot of load on the server and a very large delay for your users during the creation of those forms. The better route would be to put visits 1-5 under a parent form (e.g. “Visit Group 1″) and then only insert the parent form. All the child visits would be defined in the data architect for that parent and they would be automatically be inserted as well. (Visits 1-5 would be set to ‘Auto Create = true’, and Visit Group 1 would be set to ‘Auto Create = false’).
  2. Be aware of the number of scripts per form and question.
    1. The more scripts you place on a single form or question, the longer that form is going to take to process/save. In general, you should try not to have more than:
      • 5 scripts per question.
      • 20 scripts per form.
      • 3 form saves. If 4 forms are saved at the same time because of scripts firing, a recursive error will occur.
  3. Check for errors in input data before processing it. Not checking for errors may cause an error in the application or produce Form Errors to the end user that they will have no control over.
    • Verify that a question is answered before performing an action to it.
    • Verify that the length of an input is appropriate before passing it to a function (e.g.substr).
    • Verify that formats are appropriate before doing comparisons.
  4. Scripts should not exceed the total character count of the entire script ~32,000 characters.

Need more help?

Please visit the Fountayn Contact Information page.