Versions Compared

Key

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

On this page:

...

Code Block
IDictionary<string,string> customParams = new Dictionary<string, string>(); 
customParams.Add("autoLogin", "true");
//customParams.Add("updateNonDesigners", "true");  //if user is not a frevvo.Designer, this must be set for user to be officially 'created' otherwise user is truly virtual/temporary
 
string[] roles = { "frevvo.Designer" };   

FormsService service = new FormsService("http://localhost:8082", "yourappname");      
          service.LoginAs( 
              "newUserName",
              "tenantAdminUserName@myTenantName",
              "tenantAdminPassword",
               true,
              roles,  //optional param – may be null. Specified roles will be created if necessary.  When null, a non-designer user (able to participate in flowsworkflows but not create flowsworkflows/forms) will be created if necessary.  
              "newUserFirstName",  //optional param – may be null 
              "newUserLastName",  //optional param – may be null
              "newUserEmailName@EmailServer.com",  //optional param – may be null
               customParams);

UserEntry user = service.GetUser("newUserName"); 
   
// interact with frevvo                
         
service.Logout();

...

Code Block
    string appId = ...;
    FormsService fs = ....;
    ApplicationEntry app = fs.GetApplication(appId);

How do I get the

...

URL to a form so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form url URL as shown in the snipped below:

Code Block
    FormTypeEntry formType = ...; // find the correct formtype entry
    string formTypeUrl = formType.FormTypeEmbedLink.AbsoluteUri;

Then using the url URL in formTypeUrl above you can generate the following script tag in your html page:

...

This will embed the form in your page inside an <iframe/>.

How do I get the

...

URL to the form designer so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the formType url URL as shown in the snipped below:

...

This will embed the form designer in your page inside an <iframe/>. 

 

How do I get the url URL to the form submissions so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form url URL as shown in the snipped below:

...

This will embed the submissions view in your page inside an <iframe/>.

How do I get the

...

URL to the form instance so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form instance url URL as shown in the snippet below:

...

This will embed the form instance in your page inside an <iframe/>. 

How do I get the

...

URL to return the form instance embed java script?

First get a hold of the corresponding FormTypeEntry and then get the url URL as shown in the snippet below:

...

Warning

Objects, of any kind, that are part of a Flow workflow cannot access the list of controls for the Flowworkflow.  Attempted access of FormTypeEntry.ControlTypeFeed, FormTypeEntry.ControlTypeFeedLink, FormEntry. ControlFeed, or FormEntry.ControlFeedLink will result in a NotSupportedException.

...

Warning

Printing objects of any kind that are part of a Flow workflow is not supported and will result in a NotSupportedException.  

...

Code Block
string fileName = ....;
UserEntry user = ....; 
 
// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id.
ApplicationEntry entry = user.ApplicationFeed.UploadAndReplaceApplication(fileName); 
 
// If an entry with the same id already exists, it will be copied.
// Otherwise, the archive will be uploaded with the same id.
ApplicationEntry entry = user.ApplicationFeed.UploadAndCopyApplication(fileName); 
 
// If an entry with the same id already exists, it will be copied. 
// Otherwise, the archive will be uploaded with a new id.
ApplicationEntry entry = user.ApplicationFeed.UploadAndInsertApplication(fileName); 

How do I update the ElementName for a Form or

...

Workflow?

Code Block
FormTypeEntry fe = TestApplication.FormTypeFeed.CreateEntry();
fe.ElementName = "test";
TestApplication.FormTypeFeed.Insert(fe);. 

...

Code Block
fe.ElementName = "TemporaryForm";
fe.Update(); 

How do I upload a form/

...

workflow?

There are three options when uploading a Flow workflow or Formform: Insert, Copy or Replace:

...

Code Block
FormsService service = ....;
StyleQuery query = service.CreateStyleQuery();
StyleFeed styles = service.Query(query) as StyleFeed;
foreach (StyleEntry style in styles.Entries)
{
Console.WriteLine("Style: " + style.Title.Text);
}

How do I set the Style property for a Form or

...

Workflow?

Code Block
FormTypeEntry formTypeEntry = ....; 
formTypeEntry.Style = "blue";

formTypeEntry.Update();  

How do I upload a form/

...

workflow?

There are three options when uploading a Flow workflow or Formform: Insert, Copy or Replace. You can use a Stream or a file path location when uploading.

Code Block
string fileName = ....;
bool isForm = ....;
ApplicationEntry appEntry = ....; 

// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(filename, isForm); 

// If an entry with the same id already exists, a copy will be made.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(filename, isForm); 

// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(filename, isForm); 
 
Stream appStream = ....;
bool isForm = ....;
ApplicationEntry appEntry = ....;
 
// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(appStream,isForm);

// If an entry with the same id already exists, a copy will be made. 
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(appStream, isForm);


// If an entry with the same id already exists, it will be replaced. 
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(appStream, isForm);  

...

Section
Column
width50%
Code Block
/// Add an xml signature to this builder from a given stream

public FormEntryBuilder DigitalSignature(Stream inputStream, string contentType, string
fileName) 
Column
width50%
Note

This method deprecates the previous method:

public FormEntryBuilder DigitalSignature(Stream inputStream, string contentType)

Get the Raw Link to the form/

...

workflow from the FormTypeEntry:

Code Block
FormTypeEntry fte = ….; 

//Get Raw Link 
AtomLink rawLink = fte.GetFormTypeLink(null);

...

 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.

...

What do I do if API submission access fails?

Ensure the form/flow workflow submissions you are trying to access has either the userid or Roles that the user is a member of in "Who can view submissions" ACL.

...