Skip to Content

How to add dynamic event script to dynamic component in SAP Lumira Designer 2.2

Hi All,

We have a requirement where an array of text components needs to be generated based on dataset from query on the fly when the dashboard loads. This is possible to achieve thanks to dynamic Create Component function which has been introduced in Lumira Designer.

But the user also wants to add action to the dynamic text component like on click some popup should be generated.

Is there anyway to bind a function to dynamically created component?

Regards,

Kiran

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 28, 2019 at 10:37 AM

    Hi Kiran,

    if I understand you right, I am doing similar things in my dashboards by copying properties from a pre-defined component such as an icon or a button as a source. In your case this would be another text component:

    The source_text can be defined at design time, the target_text at runtime:

    var target_text = COMPONENTS.createComponent(ComponentType.Text);

    COMPONENTS.copyProperties(source_text, target_text);

    Hope this helps!

    Martin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.