Upload and parse an excel file in workspaces

mpmacconnell
Tera Guru

I have a requirement where the users can take an excel template and upload it to the RFC form. This would then parse the file and add the devices to the affected CI's. We need to do this in the Service Operations Workspace.

 

Currently we do have the solutions suggested to do the UI action and that works great in the standard UI. But because it uses jelly it will not work in the Service Operations Workspace.

 

Wonder if someone has done something like this in the Workspaces and how that is accomplished.

10 REPLIES 10

ChrisBurks
Mega Sage

Hi @mpmacconnell 

Doing a search on Workspace and UI Actions I believe a UI Page can be displayed in Workspace through a UI Action with the use of the g_modal.showFrame() api.

The method takes an object with these properties:
title - Text that will show as a title for the pop up
url - path (can be relative) to the UI page
size - the width of the popup. it accepts these values: 'sm', 'lg', 'xl', and 'fw'

height - the height of the popup in pixels (note: it has a default max though. I think 600px)

 

As an example the following will display an OOB example UI page if defined in the "Workspace Client Script" field of a UI Action

function onClick(g_form) {
        g_modal.showFrame({
                title: 'My Workspace UI Action/UI Page Test',
                url: 'example_apps_list.do',
                size: 'lg',
		height: '600px'
        });
}

 

test_ui_action_w_ui_page.png

If all of your processing is done in your UI page then theoretically it should work.

I hope this gets you further in your process.

I tried that, but sadly does not work because the UI page has Jelly script in it. It won't load properly because of that.

What's the UI page process? Is it's job to upload the file and do the parsing of the file?

 

Here is an example of a custom UI page using Jelly to get information passed from the Agent workspace UI action.

It also contains an upload button to upload an attachment. This one is using a CSV file but the concept is the same. There could probably just be an error in the scripting Jelly or otherwise for yours.