Listening to variables

418 views
Skip to first unread message

sagar....@flowian.com

unread,
Nov 22, 2014, 3:10:04 AM11/22/14
to suppor...@runmyprocess.com
Hi Team,

I have four file widgets on the same web interface but present on the different screens.

I have written one javascript which will display the file information uploaded in any one of the file widget.

So for that I have added file widget variable names in "Listen to Variables" section of my Javascript.

But the problem is when I add all the four variables in the "Listen to variables" section, the script is not executing when any file is uploaded in to the system.

But for single file widget variable it was executing.


So my question is Can we write multiple variables into the "listen to variables" section of Javascript?

Also that variables need to be on the same screen?

Or what will be the problem?

Regards,
Sagar

Shobhit Tripathi

unread,
Nov 22, 2014, 8:21:53 AM11/22/14
to suppor...@runmyprocess.com
Hi Sagar,

You can use same varaiable name of each upload widget in different screen and use that variable into "listen to variable" of JavaScript widget.
Make sure that JS  and html widget are "Avaiable" in all screens.

JS code -

var uploaded_files_infos_html = "<table border='1' cellpadding='5'><tr><th>File name</th><th>File type</th><th>Uploaded by</th><th>Upload date</th></tr>";
for(var f=0;f<[[files]].length;f++)
{
uploaded_files_infos_html = uploaded_files_infos_html + "<tr><td>"+[[files]][f].name+"</td><td>"+[[files]][f].name.substring([[files]][f].name.lastIndexOf('.')+1,[[files]][f].name.length).toUpperCase()+"</td><td>${P_connected_user.name}</td><td>${now('dd/MM/yyyy')}</td></tr>"
}
uploaded_files_infos_html = uploaded_files_infos_html + "</table>";

id_html.setHtml(uploaded_files_infos_html);


where- files is variable of upload widget in different screen
       id_html - Identifier of html widget

Hope this will help you.

Thanks & Regards,
Shobhit


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/19d37673-8beb-4cdd-b8a1-2bb021e0124c%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--
Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess
Reply all
Reply to author
Forward
0 new messages