Access process variable from link or button

1
+1
-1

Hi guys :)
maybe you can help me.
i have a process variable called "bookURL" with the site url of one book (http://www... etc).
i want to show a link or a button in one form so when the user click them, he will be redirected to the site, but i cannot do it.
If i show the variable in one input, everything is ok .. but, i dont know how to put that variable in one "link" or "button" as a external link.

Thanks!

2 answers

1
+2
-1
This one is the BEST answer!

Hi Mauro,
I would say, first you need to get your process variable onto your form. You can do it via the API (I made a custom widget for that http://community.bonitasoft.com/project/get-activity-variables).

Then you can either use the above mentioned widget of bpms.help or include the code into your link (by using the link/http widget) and input something like this

<a href="{{ caseVariables['bookURL'] }}" target="_blank">Check out this great book</a>

Hope it helps..
Valerio

Comments

Submitted by mapo.lp on Wed, 11/16/2016 - 19:13

Valerio, you are the best :)
thank you!

Submitted by valerioneri.de on Wed, 11/16/2016 - 20:20

You are welcome! :)

1
-2
-1

Just create a Custom Widget that will execute a window.open(http://mylocation) in JavaScript.

regards
Seán

PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.

Comments

Submitted by contact_420 on Wed, 11/16/2016 - 10:42

If you don't know how to do it, you can download such widget from my site. It allows to execute any JavaScript function: http://bpms.help/download.php

Best regards,
bpms.help

Submitted by mapo.lp on Wed, 11/16/2016 - 19:14

thanks contact_420 !

Notifications