dokuwiki-plugin-bureaucracy icon indicating copy to clipboard operation
dokuwiki-plugin-bureaucracy copied to clipboard

Double entries after combination of "action struct_lookup" and "action template"

Open Juergen-aus-Zuendorf opened this issue 3 years ago • 2 comments

I have the following form:

<form>

fieldset "Materialdaten"
struct_field "cms_akat_benenn.cms-akat-matnr"
action struct_lookup

fieldset "Grunddaten"
struct_field "cms_akat.cms-akattyp" "=["""",1]"
action template akat:cx:@@cms_akat.cms-akattyp@@:@@cms_akat_benenn.cms-akat-matnr@@

fieldset "Daten anlegen"
submit "anlegen"

</form>

After submitting, I go to a filter page to search for all pages with the relevant struct_field "cms_akat.cms-akattyp", and I always get TWO entries, one with pageid and one without.

The aggregation mentioned above looks like this:

---- struct table ----
schema     : cms_akat
cols       : cms-akattyp, %pageid%
----

Regards Juergen

Juergen-aus-Zuendorf avatar Jul 28 '21 13:07 Juergen-aus-Zuendorf

This is because latest version of struct allows to mix the page and lookup data in one schema. I wouldn't consider this a bug - I believe it is how it should work. Why do you need to have both action template and action struct_lookup in one form?

solewniczak avatar Aug 26 '21 10:08 solewniczak

I would like to add data as lookup entry and then reference to the same data in the template without copy & paste from one form to another (this is my workaround at the moment).

As you see in my example, the template action uses parameters from both fieldsets.

Juergen-aus-Zuendorf avatar Aug 30 '21 08:08 Juergen-aus-Zuendorf