# update view

**URL:** <https://forum.servoy.com/t/update-view/9107>\
**Category:** Classic Servoy\
**Created:** [May 21, 2008, 8:13am UTC](https://forum.servoy.com/t/update-view/9107 "2008-05-21T08:13:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leendert](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Leendert](https://forum.servoy.com/u/Leendert)\
**Post date:** [May 21, 2008, 8:13am UTC](https://forum.servoy.com/t/update-view/9107/1 "2008-05-21T08:13:42Z")

</div>

I display a field with at the dataprovider a relation to a view. How do I update Servoy so I can see a new added value to the view, without restarting Servoy?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [May 21, 2008, 8:51am UTC](https://forum.servoy.com/t/update-view/9107/2 "2008-05-21T08:51:47Z")

</div>

I am not familiar with view but won’t DatabaseManager.refreshRecordFromDatabase(…) do it for you?

---

<div class="post-metadata">

**Author:** ![Leendert](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Leendert](https://forum.servoy.com/u/Leendert)\
**Post date:** [May 21, 2008, 9:04am UTC](https://forum.servoy.com/t/update-view/9107/3 "2008-05-21T09:04:15Z")

</div>

Tried it already but it doesn’t work

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [May 21, 2008, 9:11am UTC](https://forum.servoy.com/t/update-view/9107/4 "2008-05-21T09:11:26Z")

</div>

hmm, another suggestion but maybe not really preferred: plugins.rawSQL.flushAllClientsCache(…)

---

<div class="post-metadata">

**Author:** ![Leendert](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Leendert](https://forum.servoy.com/u/Leendert)\
**Post date:** [May 21, 2008, 9:16am UTC](https://forum.servoy.com/t/update-view/9107/5 "2008-05-21T09:16:45Z")

</div>

Thank you. That did work.  
Can you explain me, why it is not preferred?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [May 21, 2008, 9:21am UTC](https://forum.servoy.com/t/update-view/9107/6 "2008-05-21T09:21:17Z")

</div>

It is documented when I am not mistaken.  
It can be an expensive operation because it really flushes all cache…

But when it does the job and you are happy with it I would say: go ahead ![:)]( "Smile")

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [May 21, 2008, 9:32am UTC](https://forum.servoy.com/t/update-view/9107/7 "2008-05-21T09:32:41Z")

</div>

It’s a bit strange that the DatabaseManager.refreshRecordFromDatabase() didn’t do the trick.  
What syntax did you use ?

---

<div class="post-metadata">

**Author:** ![Leendert](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Leendert](https://forum.servoy.com/u/Leendert)\
**Post date:** [May 28, 2008, 8:26am UTC](https://forum.servoy.com/t/update-view/9107/8 "2008-05-28T08:26:20Z")

</div>

I build a test form where I tested DatabaseManager.refreshRecordFromDatabase. The view was updated. But in my application a record of the view must be updated en that updated record containts a name. I show on my form, the name in the view by a relation. That is where DatabaseManager.refreshRecordFromDatabase doesn’t work.

---

<div class="post-metadata">

**Author:** ![Leendert](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@Leendert](https://forum.servoy.com/u/Leendert)\
**Post date:** [May 28, 2008, 8:38am UTC](https://forum.servoy.com/t/update-view/9107/9 "2008-05-28T08:38:21Z")

</div>

I solved the problem. I have to update the view and refresh the relation.

databaseManager.refreshRecordFromDatabase(relationname.foundset, -1)

relationname.relookup()
