Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The FAQs provide some examples and code snippets for common tasks when a third-party application wants to interact with the serverfrevvo server.

On this page:

Table of Contents
maxLevel1

Note

In v9.1 and later ' later frevvo "Applications" are known as "Projects," and "Themes" are known as "Styles." The API objects and methods still use the words 'application', 'app', and 'theme'.

How do I login and logout to and from a server?

...

Since there is some overhead associated with logging in and out, you need to keep the FormsService instance around for as long as you need to interact with  before frevvo before logging out.

How do I get the list of all projects for the current user?

...

This is often needed when you need to relate an  form a frevvo form with another concept of your project (e.g. you your project has the concept of a report that has an associated  formfrevvo form). In this case, you will store the form id somewhere and when needed fetch the form entry to embed it in your page, delete it, etc. Here is how you get the for a form entry (in fact any entry):

...

How do I create a new form?

First, you have to get a hold of the form feed from an existing project. See How do I get the list of all forms for a given project?

...

Note

Inserting the original newEntry will not update it, but instead, a new entry will be returned.

...

The only difference between creating a new form and creating a new one based on an existing form is that instead of using the entry created by calling 'ftFeed.createEntry()' you will be using an existing form entry. Find an existing form entry, update its name and description, and use that entry to insert it into a feed. Do not override the entry id otherwise, the insert will fail.

Code Block
    FormsService fs = ...;
    ApplicationEntry appEntry = ...; // find app entry
    FormTypeEntry ftEntry = ...; // find template form entry 
    ftEntry.setTitle(new PlainTextConstruct("MyForm"));
    ftEntry.setSummary(new PlainTextConstruct("MyForm Description"));
    FormTypeFeed ftFeed = appEntry.getFormTypeFeed();
    FormTypeEntry newEntry = ftFeed.insert(ftEntry);

...

The submissions feed will retrieve all type types of submissions: submitted, saved, deleted (Deleted submissions are soft deleted meaning they are marked in the database as deleted, but the records are still present in the DB and they will be returned in the SubmissionFeed). The  Submissions UI page, by design, shows only the submissions which are completed.

...

How do I get a form submission PDF when Save PDF is not enabled?

Using APIfrevvo API, you can instantiate each form submission, get the PDF for that instance and then cancel the form instance. Note that the PDF will not show up in the form submission when using this approach as the instance is canceled.

Here is an example API script that will download PDF's PDFs for all form submissions to disc:

...

The users csv upload is available through the Java data api in v6frevvo v6.1.4+. Here is the code snippet:

...

You can specify who receives an email reporting the upload status when it is done through the API. The email is sent to the "notificationEmailAddress" that is passed in the API. The email may say something like this if there are errors during the upload:

Code Block
Validation occurred with errors. Users data NOT loaded. Refer to attached CSV data file for validation and/or loading result details.

...

LDAP, SAML, and SAML Azure Security Managers provide a built-in admin login directly to frevvo, which is helpful if your security manager logins should become inaccessible and you need to access frevvo.  This built-in admin is automatically enabled from the API when using SAML, but for LDAP it needs to be explicitly enabled by setting the custom property "backdoorLogin" to true in the loginAs call. This will allow the API to login in the same way a built-in admin can login log in using /frevvo/web/admin/login.

...