You are viewing limited content. For full access, please sign in.

Question

Question

Retrieve from excel or csv and fill the Form

asked on September 22, 2018 Show version history

Hi,

I wanted to know that if there is a way to fill the form fields from an excel file that is uploaded by the user.

The case is that the user will upload an excel or csv file and based on the values in this file the fields should be generated. Please let me know if this is possible. Thanks in advance.

0 0

Replies

replied on September 28, 2018 Show version history

Dear Shibin,

 

Your requirement is feasible, but a little bit complex.

you need first to configure the query data, data source to read from an excel file on the windows drive.

let's say the data source is configured for : C:\Users\Laserfiche\Desktop\db.xlsx

now you need to save the excel file uploaded from forms in laserfiche.

now in the workflow you need to search for the entry uploaded from laserfiche forms and add the following script using the documentExporter Class, that can be used in the sample examples of laserfiche SDK.

 

dim docuexp as new DocumentExporter()

            dim doc as DocumentInfo = new DocumentInfo(GetTokenValue("FindEntry_OutputEntry_ID"),RASession)
            docuexp.ExportElecDoc(doc,"C:\Users\Laserfiche\Desktop\db temp.xlsx")
            File.Copy("C:\Users\Laserfiche\Desktop\employee db temp.xlsx","C:\Users\Laserfiche\Desktop\db.xlsx",true)
            File.Delete("C:\Users\Laserfiche\Desktop\db temp.xlsx")

the sequence of the workflow should be :

 

1- find the entry

2- export the entry using SDK script

3- query data on the datasource

4- for each row in datasource

5-populate multi value tokens

6- set business process activity in order to populate the form.

 

Hope it helps.

Maher.

1 0
replied on September 24, 2018 Show version history

With Workflow you can query an excel file via an ODBC connection, but this needs to be an established connection.  The query results could be used to populate your form.  But there isn't a way that I know where you could upload a file via forms and then query that file to populate the fields on the form.

 

Someone else on Answers may have figured this out, but from my experience it cannot be done.

0 0
replied on March 5, 2019

Thanks for the feature idea. I've included this idea in our Forms feature ingestion portal for review.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.