Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Gerry
0
Views
5
Comments
Display import count on Excel import
Question
I'm doing an Excel import and I want to display a count of how many records have been created while it's running. The import button needs to be a submit, so I'm guessing that's why Ajax refreshes of any counter on the screen doesn't work. Does anyone have any suggestions?
Thanks!
Luis Soares
Hello,
Create a local variable (ex: count) starting on 0 (zero).
each time a record is imported: count=count+1
In the end: return / show count
Hope it helps,
Luis Paulo Soares
Gerry wrote
:
I'm doing an Excel import and I want to display a count of how many records have been created while it's running. The import button needs to be a submit, so I'm guessing that's why Ajax refreshes of any counter on the screen doesn't work. Does anyone have any suggestions?
Thanks!
2 replies
Last reply 06 Jun 2012
Show thread
Hide thread
Gerry
lpsoares wrote
:
Hello,
Create a local variable (ex: count) starting on 0 (zero).
each time a record is imported: count=count+1
In the end: return / show count
Hope it helps,
Luis Paulo Soares
Gerry wrote
:
I'm doing an Excel import and I want to display a count of how many records have been created while it's running. The import button needs to be a submit, so I'm guessing that's why Ajax refreshes of any counter on the screen doesn't work. Does anyone have any suggestions?
Thanks!
I know I can do that. I want to show the counter while the import is running. That's the problem.
Miguel Seabra Melo
Gerry wrote
:
lpsoares wrote
:
Hello,
Create a local variable (ex: count) starting on 0 (zero).
each time a record is imported: count=count+1
In the end: return / show count
Hope it helps,
Luis Paulo Soares
Gerry wrote
:
I'm doing an Excel import and I want to display a count of how many records have been created while it's running. The import button needs to be a submit, so I'm guessing that's why Ajax refreshes of any counter on the screen doesn't work. Does anyone have any suggestions?
Thanks!
I know I can do that. I want to show the counter while the import is running. That's the problem.
Hi Gerry,
Since you're doing a file upload the button you use will need to be a Submit, meaning you won't be able to send back Widget Refreshes during that screen action.
This means that, to do something like that, you will need to first submit the file, somehow store the binary data somewhere (session var?), and then on another call back to server (this time via ajax) create the records one at a time sending Widget Refreshes in the meantime.
Hope this helps,
Miguel
Luis Soares
Hello,
On the submit button you can store the binary on a table and try to process it after. I think you can use the widget_click to process a ajax action after the upload. Correct me if my idea is wrong.
Miguel Melo wrote
:
Gerry wrote
:
lpsoares wrote
:
Hello,
Create a local variable (ex: count) starting on 0 (zero).
each time a record is imported: count=count+1
In the end: return / show count
Hope it helps,
Luis Paulo Soares
Gerry wrote
:
I'm doing an Excel import and I want to display a count of how many records have been created while it's running. The import button needs to be a submit, so I'm guessing that's why Ajax refreshes of any counter on the screen doesn't work. Does anyone have any suggestions?
Thanks!
I know I can do that. I want to show the counter while the import is running. That's the problem.
Hi Gerry,
Since you're doing a file upload the button you use will need to be a Submit, meaning you won't be able to send back Widget Refreshes during that screen action.
This means that, to do something like that, you will need to first submit the file, somehow store the binary data somewhere (session var?), and then on another call back to server (this time via ajax) create the records one at a time sending Widget Refreshes in the meantime.
Hope this helps,
Miguel
1 reply
06 Jun 2012
Show thread
Hide thread
Miguel Seabra Melo
lpsoares wrote
:
Hello,
On the submit button you can store the binary on a table and try to process it after. I think you can use the widget_click to process a ajax action after the upload. Correct me if my idea is wrong.
Yes. During the Submit action (where you upload the file) you can do a
RunJavascript()
(this action is in the HTTPRequestHandler extension) to queue some js execution for when the page reloads. The Js could be something like
osjs('#MyButtonId').click();
Which will call button MyButtonId, a potentially hidden ajax button, to do the record creation run.
Miguel
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...