MIGXdb presented in manager page of a resource

Hi all,

i have a MIGXdb that i am wanting to use for creating specific functionality. I want to be able to create and label a button with a certain value that is linked to the resource.

Set up the table (i.e. containing resource, value, and label) as part of a package (Organisatie) i created for other functionality. It has a classname (StemOpties).
Set up a MIGX-config “StemKnoppen” which has the references to package Organisatie and the classname StemOpties.
Created a topmenu item to migx - StemKnoppen, which shows me te correct CMP and some database rows i already filled.

Using the MigxLoopCollection snippet i am able to extract the values for selected resources in the front end.

Also set up a TV StemOpties which has Migxdb as input type and StemKnoppen as the config. It is also set to have correct template access.

However if i go to a selected resource in the backend an view the TV-tab i get an empty table.
like below:

i guess i should be seeing the complete tabel there. Can anyone shed light on this?

the goal is to get only the assigned rows by resource. Tried the getlist where {“resource”:“[[+id]]”} but that didn’t change anything.
As i am not able to find desent documentation to create such an option. i am asking here for your help.

It should work if the column that links to the resource is called “resource_id”.
Also make sure that in the config in the tab “MIGXdb-Settings”, “Check Resource” is set to yes.

If the column is named differently, then maybe the field “Join Alias” works (if the relationship in the schema exists) or you might have to create a custom getlist processor.

Thanx for the fast response,

I changed the column resource to resource_id and altered db and re created all class files.

But still no rows… :frowning:

any other ideas? Some-one who has a situation as this working and willing to share some screenshots / files / set-up.

Can you share your schema and the MIGX-config “StemKnoppen” (right click → “Export/Import” → copy the content of the “Json” field)?

Hi halftrainedharry,
thanx for thinking with me on this problem.

Here’s my config:

    "migx_add":"Knop toevoegen",
    "formcaption":"Knop opties",
    "update_win_title":"Knop opties",
    "cmptabdescription":"De knoppen voor het stemmen; 0 = Neutraal",

The strange thing is that everything functions as it should in snippets, CMP etc. etc. The only thing i can not get working is showing the table with only associated resource on the (current) resource via a TV…

When I remove the “Where” setting {"resource_id":"[[*id]]"} (tab “MIGXdb-Settings”) and the “resource_id” field (tab “Formtabs”), it seems to work.

You can also set “Load Grid” (tab “MIGXdb-Settings”) to auto, so you don’t have to click the “Load Grid” button every time.

Yes Thanx! Thats working!
Seems that no modx-tags are being parsed here.

MODX tags gets parsed here. But the tag [[*id]] is not set in that situation

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.