cancel
Showing results for 
Search instead for 
Did you mean: 

How to show a widget after script is done

jrodrig4
Explorer
0 Kudos

Hi experts,

In the optimized dashboard experience, I have the following situation:

1. I've incorporated a custom widget that contains numerous key figures. Initially, this widget remains hidden.

2. Within my onInitialization function, I invoke another function to clear all key figures and display only a predefined subset by default.

3. Towards the end of the onInitialization process, I make the custom widget visible.

What I've observed is that in SAC, the widget becomes visible first, and only afterward do I observe the changes made by my custom function, which is called during the onInitialization.

Is there a way to ensure that the custom widget is displayed only after the preceding code has been executed and is fully complete?

Thank you for your assistance!

View Entire Topic
Susanne_Helbig
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear jrodrig4,

you mentioned that you call another function in the onInit function, which sets the predefined key figures.

What happens if the .setVisible() statement is triggered at the end of this other function and not in the onInit?

Best regards
Susanne

jrodrig4
Explorer
0 Kudos

Dear Susanne,

I will try that solution and let you know how it goes.

Thanks for answering.

Regards,

Javier