Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to run a button

Hi All,

I'm trying to write a macro that 'clicks' a button. The reason for this is the button links to another application and transfers state, and from my knowledge there is no way to get a macro to transfer state.

Therefore if I can get a macro that simply 'clicks' on the button, by activating it or simulating an actual click on that button then I think it would work. I have however been unable to find any macro/function that does this and am wondering if anyone has come across something similar.

Many thanks for any help,

Jeremy

17 Replies
tamilarasu
Champion
Champion

Hi Kruthika,

Please create a new discussion as this one is already closed and not related to your question anymore.

marcus_sommer‌ Any thoughts?

marcus_sommer

I suggest to consider if this kind of usability adds really more value to the user experience? In my opinion it adds a lot of complexity without a significantly added value and that there is more "magic" if the user directly choose which sheets/objects with which selections he/she needs.

Beside this you might need some more trials (one or two shots aren't enough - you might need some dozens) to find out if all necessary configurations are set and/or if there are any dependencies between them - which options are set within the bookmark and/or is session recovery activated and/or probably some more. I could confirm that calling a bookmark will switch to the sheet to which its related to.

Further if you want to remain by this kind of logic you might need to adjust them a bit and/or replace and/or combine them with logic which might lead to similar results. This could for example be:

- using of url's: AJAX and URL parameters

- use of document-extensions

- using fieldselections to control the sheet-visibility

- Marcus

skiruthigadevi
Partner - Creator
Partner - Creator

Sure Thank you!

skiruthigadevi
Partner - Creator
Partner - Creator

Thanks Marcus. My application has almost 50 hidden sheets with OnLeaveSheet trigger as well. I am trying via BookMarks. But it is not working either.

I am  calling BookMark  via onActiveSheet actions -->BookMark--Id. As OnActiveSheet doesn't work in Ajax means it wont invoke BookMark.

Is there any other alternative do you have to call the BookMark when opening the sheet?

Attached a sample application for your reference.

Thanks,

Kiruthiga

marcus_sommer

You could call the bookmarks with a button or maybe an OnChange of a variable or a fieldselections.

- Marcus

skiruthigadevi
Partner - Creator
Partner - Creator

Hello Marcus,

Appreciate your time. Thanks a lot. The problem is the change has to get reflected when opening the  sheet before doing selections or changes with in the sheet.

For example: All the metrics should be cleared when opening the sheet.

Do you have a sample application?

Thanks,

Kiruthiga

marcus_sommer

If you used buttons with variables or fieldselections for switching the sheets you could also use this call to do all other actions which you need. For example your button mustn't just change a variable which disabled sheet X and enabled sheet Y - it could also select/deselect any fields, changing further variables, calling bookmarks and so on.

Whereby like above mentioned I don't suggest using such approaches. To get a stable usability with dozens of hidden sheets and by each sheets you need a varity of different further selections is really hard work. I have played some years ago for a special project with this kind of usability and it was just wasted time - to spend hours/days/weeks to make simple things a lot more complicated is not really a clever idea ... and for this reason I don't use it anymore and have also no samples with it.

- Marcus

skiruthigadevi
Partner - Creator
Partner - Creator

Sure, I have started adding all those actions in  all the navigation buttons to those corresponding pages.

Thanks,

Kiruthiga