# SelectAll dependency

**URL:** <https://forum.servoy.com/t/selectall-dependency/1784>\
**Category:** Classic Servoy\
**Created:** [April 25, 2004, 6:55pm UTC](https://forum.servoy.com/t/selectall-dependency/1784 "2004-04-25T18:55:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Westy](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Westy](https://forum.servoy.com/u/Westy)\
**Post date:** [April 25, 2004, 6:55pm UTC](https://forum.servoy.com/t/selectall-dependency/1784/1 "2004-04-25T18:55:15Z")

</div>

Is

elements.fieldname.requestFocus(false);  
always required before  
elements.fieldname.selectAll();

It seems that way, but I do not see it in my documentation.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [April 25, 2004, 7:56pm UTC](https://forum.servoy.com/t/selectall-dependency/1784/2 "2004-04-25T19:56:26Z")

</div>

not really

```auto
elements.selectTest.selectAll();
var v = elements.selectTest.getSelectedText()
application.output(v);

```

will return the selection (so the complete string)

but what you do is selectAll and then click in the field..  
and when you click in the field the selection is gone because you set a new mark.. because of that you need to give it focus first.

maybe we can tweak it a bit better in further releases (selectOnEnter property does special things after you select into the field)
