TableView Merger Active Filter
Asked by Enrico Steinbach:

Hi everyone!

I have to forms (Form1 and Form2). In Form1 i write Changes concerning new instructions (Field Content as text). In Form2 the co-workers must sign these Changes. So in Form2 is a Field Content as smart dropdown referenced to Field Content in Form1.

Now I would like to display the respective change and with it the names of the co-workers who signed it. But Table View Merger shows all changes. Is there a filter with which I can select the changes and it shows me the associated co-workers?

Thx for help!

![image001.png](/t5/image/serverpage/image-id/326664i33FE19A6291ED875/image-size/large?v=v2&px=999 "image001.png")![image002.png](/t5/image/serverpage/image-id/326665iD0E75AEFD97D4E9B/image-size/large?v=v2&px=999 "image002.png")


Answers:
author: Alex Medved _ConfiForms_
body: Hi [@Enrico Steinbach](/t5/user/viewprofilepage/user-id/5508411)

Your forms dont have a common key that ConfiForms can use to merge data rows

Trying building a TableView over your form 1 and add an additional ConfiForms Field macro that uses queryAndRender function to retrieve rows from form 2 matching the form 1 row

<https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions>

    id.queryAndRender(Form2:@self;Content:[entry.id];Name;table)

Alex

comments: author: Enrico Steinbach
body: Hello Alex,

I built it as you described:

![unnamed.png](https://community.atlassian.com/t5/image/serverpage/image-id/326850i6F65959F9328F73A/image-size/large?v=v2&px=999 "unnamed.png")

But i got only an empty id column back:

![unnamed (1).png](https://community.atlassian.com/t5/image/serverpage/image-id/326851i24FB5276B02CE642/image-size/large?v=v2&px=999 "unnamed (1).png")


author: Alex Medved _ConfiForms_
body: Recorded a [video for you](https://wiki.vertuna.com/download/attachments/178782502/Community%20-%20TableView%20Merger%20Active%20Filter.mov?version=1&amp;modificationDate=1717049165830&amp;api=v2), hope it helps


author: Enrico Steinbach
body: It works! You are great! Thank you!


author: Enrico Steinbach
body: Hi [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)

there is one question left (probably the last :-))

Is it possible to build a "created" into the queryAndRender function? So that i can see, when the sign was made?


author: Alex Medved _ConfiForms_
body: While recording the demo for you I have also tried to show the "created" field, but found out that it was not working (that will be fixed shortly)

And this construction will work

    id.queryAndRender(Form2:@self;Content:[entry.id];Name|created;table)

To workaround this issue now you can set up an IFTTT macro that auto-assigns the value to some hidden field and use that

This is what I mean

![signed1.png](https://community.atlassian.com/t5/image/serverpage/image-id/326907i7F53D28B868918A6/image-size/large?v=v2&px=999 "signed1.png")

IFTTT to update field onCreated

```
entryId=[entry.id]&signedWhen=[entry._now]
```

![signed5.png](https://community.atlassian.com/t5/image/serverpage/image-id/326908i0955EC136AE0E081/image-size/large?v=v2&px=999 "signed5.png")

Rule to hide the field

![signed4.png](https://community.atlassian.com/t5/image/serverpage/image-id/326906iD1FB0D90A7FE2EA7/image-size/large?v=v2&px=999 "signed4.png")

and the field itself, added to Form2

![signed3.png](https://community.atlassian.com/t5/image/serverpage/image-id/326905i74000B70A507034F/image-size/large?v=v2&px=999 "signed3.png")

Changing the expression to use the new field

```
id.queryAndRender(Form2:@self;Content:[entry.id];Name|signedWhen;table)
```

![signed2.png](https://community.atlassian.com/t5/image/serverpage/image-id/326909iB97294DC8DDC748C/image-size/large?v=v2&px=999 "signed2.png")

Alex


author: Enrico Steinbach
body: You are my HERO!! Thx!


author: Enrico Steinbach
body: Ok, i have a very last question:

Is it possible to hide any content? I made a Form3 with Content as Smart Dropdown and used the queryAndRender - expression as above with a tableview Form3. So when i chose the Content i would get the Names only for the chosen Content. Unfortunately i get no Names in the Table.


author: Alex Medved _ConfiForms_
body: I dont quite understand your "very last question", sorry.


author: Enrico Steinbach
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)

Maybe I haven't quite understood it yet either :-)

In Form3, I select a single content that is saved as the only value in the database (ConfiForms Rules for Field Definition 'reset value'). This value references to the names in Form2 that were drawn for this value.

So that I get all the names listed only for the single value 'content' in Form2.


Tags: addon-com.vertuna.confluence.plugins.confiforms

confiforms

confluence-data-center

data-center