Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
MPkg
Contributor III
Contributor III

HTML and variable assigning

Hello,

I have Vizlib advanced text object:

MPkg_1-1702302856574.png

 

 

='<html>'
&'<svg viewbox="0 0 880 181" width="100%" height="100%">'
//T1
&'<text text-anchor=middle font-size=24 font-weight=bold x="40" y="20">T1</text>'
&'<rect x="15" y="30" width="50" height="26" fill="RGB(0,255,0)"/>'
&'<text text-anchor=middle x="40" y="50">first</text>'
&'<rect x="15" y="55" width="50" height="26" fill="RGB(0,255,0)"/>'
&'<text text-anchor=middle x="40" y="75">sec</text>'
//T2
&'<text text-anchor=middle font-size=24 font-weight=bold x="100" y="20">T2</text>'
&'<rect x="75" y="30" width="50" height="26" fill="RGB(0,255,0)"/>'
&'<text text-anchor=middle x="100" y="50">first</text>'
&'<rect x="75" y="55" width="50" height="26" fill="RGB(0,255,0)"/>'
&'<text text-anchor=middle x="100" y="75">sec</text>'

&'</svg>'
&'</html>'

 

 

I know that I can add <a href='https://url>some text</a> to open a link when I click on T1 or T2.

What I actually need is when I click on T1 I make a selection on the Field Test: T1 (Field Test has two values T1 and T2).

I created a Vizlib action on Vizlib advanced text object: 

MPkg_3-1702303130310.png

And I thought if I can assign a value to vTest based on if I click on T1 or T2 in text box.

Is it possible to assign a value to a variable with some HTML at all, or do I need to change item, and try different approach?

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

In this case maybe you should put 2 different advance text objects instead.

View solution in original post

5 Replies
vincent_ardiet_
Specialist
Specialist

Have a look to the action "Set Variable" instead.

MPkg
Contributor III
Contributor III
Author

Thank you very much Mr. Vincent.
Correct me if I am wrong, but this action will trigger regardless of me clicking to T1 or T2 in the box? Am I right?

vincent_ardiet_
Specialist
Specialist

Yes, this is the action for the whole object, so the same action wherever you click in its boundaries.

MPkg
Contributor III
Contributor III
Author

Great, thanks.

What I need now is to somehow assign different value based on if I click on T1 or T2 on the box. I know that I can open a link based on this click, but what about assigning? I am not sure if this is possible at all, so maybe I should change the item and approach and not waste time on this solution.

vincent_ardiet_
Specialist
Specialist

In this case maybe you should put 2 different advance text objects instead.