question

Martin K5 avatar image
0 Likes"
Martin K5 asked Patrick Cloutier commented

How to get inserted value in Edit box in Dashboard?

Hi,

I would like to ask how can I get and work with inserted value in Edit box in Dashboard? This box provides "OnApply" trigger with custom code snippet. The problem is that I do not know how can I access this typed value in this box.

1688454580931.png


Thank you a lot,


Martin

FlexSim 22.2.0
codeboxvalueedit
1688454580931.png (20.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Patrick Cloutier commented

It should be getviewtext(). Passing in a reference to the edit box.

· 8
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Martin K5 avatar image Martin K5 commented ·
Yes, that's it. Thanks a lot.
0 Likes 0 ·
Martin K5 avatar image Martin K5 Martin K5 commented ·
Hi,


I would have another question regarding this topic, is it possible to set a initial value to this type box? If so, how?


Thank you,


Martin

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Martin K5 commented ·

I've not managed to use setviewtext since the opener triggers found in the standard views are not present/preserved in dashboards.

If you can link it to something that might work for you.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Martin K5 commented ·

Hello Martin. What is the correct synthax for using getviewtext()? How do you reference the edit box?

I tried these but they don't work:

getviewtext(itemcurrent(c))

getviewtext(current)

getviewtext(link)

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Patrick Cloutier commented ·
treenode box=getdashboardcontrol("myEditBox");
return getviewtext(box);
0 Likes 0 ·
Show more comments