ConfiForms - how to trigger filter rules after data changed?
Asked by Markus:

Hei there!  

I have a small TableView with some filter rules. Really simple - filter apply to a status field. You can also edit the entries inline. If you change a status for a entry I want that the filter rules is triggered oder the table rerendering. Is there any chance?  

Best regards,

Markus


Answers:
author: Alex Medved _ConfiForms_
body: Hi

What a "filter rules" - could you please explain this a bit more?

Alex

comments: author: Markus
body: Hi Alex,  

of course:  

In the properties of the TableView I configured "Filter to apply on entries dataset". ![filter.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/203547i0C798BB7A6E55B33/image-size/large?v=v2&px=999 "filter.PNG")  
When I edit a entry, I want that the view is refreshing and the entries disappear which not matching the filter.  

Markus


author: Alex Medved _ConfiForms_
body: I believe the best option would be to switch from inline editing to dialog mode with form submit and page refresh

As unfortunately, the server version (and I believe you use that) does not refresh the "view" automatically after the data change (inline update)

Alex


author: Pascal Salm
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)   
Is there any way to force a page refresh after an "inline-edit"?


author: Alex Medved _ConfiForms_
body: Hi

Are you using ConfiForms for Server/DC? On cloud this is done automatically, but on server there is no automatic refresh. And you can see my previous answer on this thread.

However, page refresh might be achieved with a custom IFTTT function though

Demo:

<http://recordit.co/zrJPouiw5z>

Configuration example:

```
<ac:structured-macro ac:macro-id="379b2347-e20e-48b6-8603-10d0777c4ba4" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="ed1777c8-1f9d-435f-86c1-020c3d45a7cf" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="9c7fcc65-11b1-4dca-9dca-7f3208ebc110" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="13dcd797-6ae0-4357-a214-0d637c4f06ac" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged():true</ac:parameter>
<ac:parameter ac:name="action">Redirect to URL</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="title">https://YOURSERVER/pages/viewpage.action?pageId=[entry._page.id]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>Static table</p>
<ac:structured-macro ac:macro-id="caf253c2-914d-456a-9ee6-f0104d9698e3" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>Table with inline edit</p>
<ac:structured-macro ac:macro-id="9fcd03f5-7aec-4b6d-aa61-c9378c3d6b32" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:parameter ac:name="enableGridEdit">true</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
```

Alex


author: Pascal Salm
body: Hi, thanks for your quick answer. I'm using the server edition.

I tried the way you described, and it seems the IFTTT refresh starts, but it's not refreshing.

I would like to have a form edit button (edit controls) for an inline edit. after the status is set to ready, a second "edit controls" should be active (done by a show/hide filter) which is for modal edit (not inline).

The switch of the to edit controls are not working automatically. The filter is working, because when i execute a page refresh, everything works.

That's why I would like to perform an auto-refresh after the status change


author: Alex Medved _ConfiForms_
body: No quite sure I understand this. You cannot have multiple edit controls per view, as far as I remember

You can see in my demo that the page refresh is performed, if you follow the instructions and the configuration precisely. Hard to tell what is not working for you without seeing the configuration. But please see what I have demonstrated - using that will refresh your page

Alex


author: Pascal Salm
body: Everything fine, just a beginner mistake.

I messed up with http and https in my link. Everything works as you mentioned!

Thank you very much for your quick help!!!


Tags: confiforms