Reading Excel File Upload from UI Actions

ibrahimmoha
Tera Contributor

Problem Statement:
The use case I'm working on is a form (Now Platform) with a UI Action button that would read an attachment (in a File Attachment field, not the paperclip; would be an Excel file) and after clicking this button, would auto populate the fields in the current form.

I have set up the import set and transform map to do so, but I'm unsure what to write in the UI Action button script.

Any guidance would be appreciated!

1 ACCEPTED SOLUTION

Ricardo26
Giga Guru

Hi,

You can use the GlideSysAttachment api to get the content from the excel file (GlideSysAttachment - Global) and GlideTextReader - Scoped to read the content
Then you can update your record with the values of the attachment.
You can also insert the values that you got from the attachment on the import set table and run the transform instead of updating the record directly, but it would be one step more in that case

View solution in original post

1 REPLY 1

Ricardo26
Giga Guru

Hi,

You can use the GlideSysAttachment api to get the content from the excel file (GlideSysAttachment - Global) and GlideTextReader - Scoped to read the content
Then you can update your record with the values of the attachment.
You can also insert the values that you got from the attachment on the import set table and run the transform instead of updating the record directly, but it would be one step more in that case