cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Expression widget: dynamic expression

fmanniti
9-Granite

Expression widget: dynamic expression

I am using the expression widget because I want to enlarge a gadget to fullscreen;

The expression is the following

(function () { const id = widget.jqElement.closest('.mashup-popup').attr('id'); $('#'+id+'_mashup-root').css({'position':'fixed', 'top':'5%', 'left':'0', 'width':'90% !important', 'height':'100% !important'}); })()

and it is binded to a button.

Now, I would like to enlarge it with a dynamic width, e.g., the user inserts the width in pixel and gives it as a input for the expression widget.

Is it possible to bind an expression to the Expression widget?

1 REPLY 1

Sorry, I found the answer.

Configure expression:

Add parameter called width: STRING

write this expression

(function () { const id = widget.jqElement.closest('.mashup-popup').attr('id'); $('#'+id+'_mashup-root').css({'position':'relative', 'width':width, 'height':'490px'}); })()

bind a input value to width

Top Tags