<![CDATA[ MigxDB inside MigxDB - get current parent id? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=104647 <![CDATA[MigxDB inside MigxDB - get current parent id?]]> https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562838
Eg I have a classes Brands and Brandcategories.

I've got a config for each brand. And brandcategories config is nested as migxdb tv inside Brand formtabs. I need to get id of the Brand, i'm currently editing, as I add a brand categorie.

dopeless Nov 20, 2018, 12:59 AM https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562838
<![CDATA[Re: MigxDB inside MigxDB - get current parent id?]]> https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562852
@EVAL return $modx->getOption('co_id',$_REQUEST,'undefined');
dopeless Nov 21, 2018, 12:12 PM https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562852
<![CDATA[Re: MigxDB inside MigxDB - get current parent id?]]> https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562851

in 'where' and it works.

Now I need to get parent's id into "columns" to save it as I add new record. I think, I need co_id, but what is the syntax? If I put something like [[+co_id]] to default value, it doesn't get the right value...]]>
dopeless Nov 21, 2018, 10:34 AM https://forums.modx.com/thread/104647/migxdb-inside-migxdb---get-current-parent-id#dis-post-562851