Export to excel with a switch

Hi,

On a webscreen I have 3 buttons, each one executing an export to excel, and all work as expected.

To avoid creating a button for each export process, I created a combobox that calls an action. This action has a switch and each one for each condition the same flow associated with each button is executed. The problem is that, although through debugging I have already verified that the process is executed, it never ends.

Can anyone help?

Thank you


Carlos Messias

Carlos Messias wrote:

Hi,

On a webscreen I have 3 buttons, each one executing an export to excel, and all work as expected.

To avoid creating a button for each export process, I created a combobox that calls an action. This action has a switch and each one for each condition the same flow associated with each button is executed. The problem is that, although through debugging I have already verified that the process is executed, it never ends.

Can anyone help?

Thank you


Carlos Messias

Hi Carlos, Can you upload the oml? so we can check and help you faster


Carlos Lessa wrote:

Carlos Messias wrote:

Hi,

On a webscreen I have 3 buttons, each one executing an export to excel, and all work as expected.

To avoid creating a button for each export process, I created a combobox that calls an action. This action has a switch and each one for each condition the same flow associated with each button is executed. The problem is that, although through debugging I have already verified that the process is executed, it never ends.

Can anyone help?

Thank you


Carlos Messias

Hi Carlos, Can you upload the oml? so we can check and help you faster


Hi,

Unfortunately it is not easy to send an oml. It is an application with confidential data. I hope an image helps.

Carlos Messias

Maria da Graça Peixoto wrote:

Hi! 

Your button method is Submit? 

If it isn't the download do not work. Please see the document in the link below. 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/Download?utm_source=ost-outsystems+tools&utm_medium=ost-servicestudio&utm_campaign=ost-docrouter&utm_content=ost-helpid-7007&utm_term=ost-contextualhelp

Graça

Stay safe


Thanks for your reply. I don´t understand you post. If a use buttons everything works fine. The trouble occurs if a use a combobox. 

Regrads

Sorry! 

The action is called though a "on Change" event?


Maria da Graça Peixoto wrote:

Sorry! 

The action is called though a "on Change" event?


Yes



Carlos Messias wrote:

Maria da Graça Peixoto wrote:

Hi! 

Your button method is Submit? 

If it isn't the download do not work. Please see the document in the link below. 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/Download?utm_source=ost-outsystems+tools&utm_medium=ost-servicestudio&utm_campaign=ost-docrouter&utm_content=ost-helpid-7007&utm_term=ost-contextualhelp

Graça

Stay safe


Thanks for your reply. I don´t understand you post. If a use buttons everything works fine. The trouble occurs if a use a combobox. 

Regrads

With button, you have an option to choose if the method is Submit, AjaxSubmit or navigate and with this Combobox you are calling the action using an onchange events and for the download to work need to be a submit method 


Maria da Graça Peixoto wrote:

Sorry! 

The action is called though a "on Change" event?


yes


The "on change" is an AJAX Submit , so the Download don't work 

But there is a work around: 

- Create one button to submit your action 

- create an action to run in the "on Change " event  that uses the "Widget_Click" to click in the button 

The button can be hidden with 

visibility: hidden;

Hope this help 

Graça

Solution

Hi,

I ended up finding a strength to resolve the situation:

- Each condition of the switch calls an empty webscreen. Each of these screens has a Preparation that performs the export process.


Carlos Messias

Solution

Thank you all