Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to synch data on page created by confiforms using IFTTT/Plainview view.

Patrick Liang June 17, 2022

I used plainview (many custom html + fields like [entry.image], [entry.bg], etc.) inside IFTTT macro to create a new page when there is a new record in my form. 

However when the page is created, every field inside the plainview is rendered as static value unlike the list view that will keep the fields macros inside it. 

The issue is that when I edit my form data, the page with plainview will not be refreshed. If I use list view with field macro, the data can be refreshed, however, I cannot do custom HTML with listview because these fields are not rendered as raw value.

Is there any other way that I can customize the "new page" but also keep the data synchronized if I edit form data?

 

Thanks,

Patrick

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2022

Hi

This is the difference between the macros and what they offer. One offers static view of the data (snapshot) while another is an "online view" over the data

An option is to re-create the page each time the data is changing or switch to ListView/CleanView instead and have a realtime data rendered every time you see the page

Alex

Patrick Liang June 19, 2022

Thank you for the quick response, Alex!

I do understand that plainview offers snapshot and other views offer "online view" over data. However, I think that it makes more sense to have the option to have a "render as raw" option for the cleanview so it doesn't add any wrapping HTML around the field value so we can manipulate data better and also when the data is in the created page, we have the flexibility to customize UI but also keep data synchronized instead of snapshot.

Re-creating page is an alternative but has its own limitation - the comments and any additional edits on that page will be purged. 

So far I had to write some custom javascript to read data from tableview/cleanview then write back to the placeholder elements on created pages in order to keep the data on these pages synchronized. 

Thanks,

Patrick

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2022

After thing about this more I really don’t quite understand what is here to "sync", as when you use any view macro from ConfiForms it will be an ONLINE representation of the data, be it via view macros that expect a ConfiForms Field macros (ListView, Table/Card views) or [entry.field_name] notations (PlainView, can also be used with CleanView and ListViews)

Screenshot 2022-06-20 at 07.33.52.png

Unless you have something like a page create IFTTT that takes a snapshot of data and process all the [entry.field_name] expressions when the page gets created

In this case you can tell ConfiForms not to process expressions by using the "rawtemplate" or use the asEntryRef virtual functions to workaround this 

Alex

Patrick Liang June 20, 2022

Hi Alex, 

I have 2 pages: 

- Page A: parent page to create a new page

-- There is a IFTTT macro to create a new page (page B for example) after a new record is created in a form on this page.

-- Inside the IFTTT macro: there is a template for the child page using HTML and plainview. Something like this:

----------IFTTT integration rules--------------
---------------------------plain view----------

-- <Div id="testid1">[entry.myfield]</div>--

------------------------------------------------

------------------------------------------------
screenshot1.PNG

- Page B: created by page A

-- When this page is created by IFTTT, the [entry.myfield] inside the plainview of the IFTTT macro on the parent page A is instantized [entry.mfield] becomes value instead of [entry.mfield]) so it now lost the connection to the data. Because it is now pure HTML instead of plainview any more. Something like this
---------------------------plain view----------

 -<Div id="testid1">value of myfield</div>-

------------------------------------------------

screenshot2.PNG

-- On the other hand, if I used list view + field macro inside IFTTT macro, the page B will have the list view + field macro instead of values. So the value will be still synchronized with the form defined in page A.

Patrick Liang June 20, 2022

The asEntryRef  function seems to work as desired. Thank you so much, Alex!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events