Versions Compared

Key

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

 

On this page:

Table of Contents
maxLevel1

...

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);  

How do I receive the Submission Document Set from a form submission?

When the _formActionDocs parameter is set, the SubmitInstance call will return a list of MultiPartContentElement objects that contain the submission documents. 

...

Code Block
FormTypeEntry formTypeEntry = ....; 
bool
// isFormrequest = ....;
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);  

How do I receive the Submission Document Set from a form submission?

When the _formActionDocs parameter is set, the SubmitInstance call will return a list of MultiPartContentElement objects that contain the submission documents. 

Code Block
FormTypeEntry formTypeEntry = ....; 

// request all data come back as part of the submit response
NameValueCollection linkParams = new NameValueCollection();
linkParams.Add("_formActionDocs", "true"); 

FormEntry formEntry = formTypeEntry.CreateFormEntry(linkParams); 

IList<MultipartContentElement> responseData = formEntry.SubmitInstance(); 

foreach (MultipartContentElement part in responseData)
{
       string dispositionType = part.ContentDispositionType;
       string name = part.Name;
       string contentType = part.ContentType;
       string contentTransferEncoding = part.ContentTransferEncoding;
       string data = part.DataPayload;
} 

 

Functions only available in the .net api for  v5.3 or later:

Note

The updates listed here are only available in .net client API version 5.3 or later.

 Note the Themes api was removed and replaced by the Styles api in frevvo 5.3.  All references to Themes have been removed in frevvo 5.3.

How do I Upload a custom script?

Code Block
string scriptFileName = ....; 
ApplicationEntry appEntry = ....;
 
appEntry.SetScript(scriptFileName);

How do I Delete a custom script?

Code Block
ApplicationEntry appEntry = ....; 
appEntry.DeleteScript();

How do I Download a custom script?

Code Block
ApplicationEntry appEntry = ....; 

Stream scriptStream = appEntry.GetScript();
string contentString = new StreamReader(scriptStream).ReadToEnd();

How do I Upload a Style?

Code Block
string styleFileName = ....; 
bool doReplace = ....;

StyleFeed feed = TestUser.StyleFeed;


StyleEntry entry =
feed.UploadStyle(styleFileName, doReplace);

How do I Delete a Style?

Code Block
string styleIdall data come back as part of the submit response
NameValueCollection linkParams = new NameValueCollection();
linkParams.Add("_formActionDocs", "true"); 

FormEntry formEntry = formTypeEntry.CreateFormEntry(linkParams); 

IList<MultipartContentElement> responseData = formEntry.SubmitInstance(); 

foreach (MultipartContentElement part in responseData)
{
       string dispositionType = part.ContentDispositionType;
       string name = part.Name;
       string contentType = part.ContentType;
       string contentTransferEncoding = part.ContentTransferEncoding;
       string data = part.DataPayload;
} 

 

Functions only available in the .net api for  v5.3 or later:

Note

The updates listed here are only available in .net client API version 5.3 or later.

 Note the Themes api was removed and replaced by the Styles api in frevvo 5.3.  All references to Themes have been removed in frevvo 5.3.

How do I Upload a custom script?

Code Block
string scriptFileName = ....; 
ApplicationEntry appEntry = ....;
 
appEntry.SetScript(scriptFileName);

How do I Delete a custom script?

Code Block
ApplicationEntry appEntry = ....; 
appEntry.DeleteScript();

How do I Download a custom script?

Code Block
ApplicationEntry appEntry = ....; 

Stream scriptStream = appEntry.GetScript();
string contentString = new StreamReader(scriptStream).ReadToEnd();

How do I Upload a Style?

Code Block
string styleFileName = ....; 
bool doReplace = ....;

StyleFeed feed = TestUser.StyleFeed;


StyleEntry entry =
feed.UploadStyle(styleFileName, doReplace);

How do I Delete a Style?

Code Block
string styleId = ....;
FormsService service = ....;

StyleEntry entry = service.GetStyle(styleId);
entry.Delete();

How do I get the list of Styles for the current user?

There are two ways to get the list of Styles for a current user.  You can use the UserEntry.StyleFeed:

Code Block
UserEntry testUser = ....;
StyleFeed userStyleFeed = testUser.StyleFeed;
foreach (StyleEntry entry in userStyleFeed.Entries) 
{
Console.WriteLine("Style: " + style.Title.Text);
}

Or you can Query via the FormsService class:

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 Flow?

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

formTypeEntry.Update();  

How do I upload a form/flow?

There are three options when uploading a Flow or Form: 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 = ....;
FormsServicebool serviceisForm = ....;
ApplicationEntry StyleEntry entryappEntry = service.GetStyle(styleId);
entry.Delete();

How do I get the list of Styles for the current user?

There are two ways to get the list of Styles for a current user.  You can use the UserEntry.StyleFeed:

Code Block
UserEntry testUser = ....;
StyleFeed userStyleFeed = testUser.StyleFeed;
foreach (StyleEntry entry in userStyleFeed.Entries) 
{
Console.WriteLine("Style: " + style.Title.Text);
}

Or you can Query via the FormsService class:

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 Flow?

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

formTypeEntry.Update(....;
 
// 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);  

How do I use FormEntryBuilder convenience class to reinstantiate forms with signatures for submission?

Code Block
string signaturePictFile = ....;
string signatureXmlFile = ....; 
string sectionFormXmlFile = ....;
string miscFile = ....;
FormTypeEntry formTypeEntry = ....;   // existing form type from feed 
Stream wetSig = File.OpenRead(scriptStream);
Stream sigXml = File.OpenRead(signatureXmlFile);
Stream formXml = File.OpenRead(sectionFormXmlFile);
Stream miscFile = File.OpenRead(miscFile);

FormEntryBuilder fbe = new FormEntryBuilder(formTypeEntry);

fbe.Document("form", formXml);
fbe.WetSignature("controlTypeId", wetSig); 
fbe.DigitalSignature(sigXml); 
fbe.Attachment("controlTypeId", miscFile); 
fbe.Data("Name", "some name");  // builds up _data 
fbe.Parameter("_formTz", "America/New_York");  // adds URL param 
fbe.FormActionDocs(true);  // set _formActionDocs param to return Submission Doc Set

FormEntry formEntry = fbe.CreateFormEntry();

IList<MultipartContentElement> responseData = formEntry.SubmitInstance();

foreach (MultipartContentElement part in responseData)
{
       string dispositionType = part.ContentDispositionType; 
       string name = part.Name;
       string contentType = part.ContentType;
       string contentTransferEncoding = part.ContentTransferEncoding; 
       string data = part.DataPayload;
}

Functions only available in the .net api for  v6.1.2 or later:

Note

The updates listed here are only available in .net client API version 6.1.2 or later.