# dynamic temporary relations

**URL:** <https://forum.servoy.com/t/dynamic-temporary-relations/9065>\
**Category:** Classic Servoy\
**Created:** [May 7, 2008, 12:46pm UTC](https://forum.servoy.com/t/dynamic-temporary-relations/9065 "2008-05-07T12:46:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdeg](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@pdeg](https://forum.servoy.com/u/pdeg)\
**Post date:** [May 7, 2008, 12:46pm UTC](https://forum.servoy.com/t/dynamic-temporary-relations/9065/1 "2008-05-07T12:46:53Z")

</div>

Hello all,

is it possible to create a temporary relation that only exists in a particular function/method, something like

var myRelation = createRelation(forms[arg1][arg2],forms[‘form’][‘field’]);  
if(myRelation.deleted){};

Regards Peter,

Servoy Developer  
Version 3.5.5  
Java version 1.5.0\_13-119 (Mac OS X)

---

<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 7, 2008, 1:06pm UTC](https://forum.servoy.com/t/dynamic-temporary-relations/9065/2 "2008-05-07T13:06:41Z")

</div>

Hi Peter,

You can’t create dynamic relations like that. What you can do however is use plain SQL and use the databaseManager.getDataSetByQuery() function.  
Or maybe you only want to be able to use a dynamic value on the left side of a join then you could use a global for that.

Hope this helps.
