Confiforms - IFTTT Integration Rules - onCreated - Create page
Asked by MCL:

When creating a page in Confiforms, I have an IFTTT that is being passed to the page being created that contains a code block. Inside of the code block all of the values of the key value json are being wiped clean on creation.

Is there a method to retain the code block in its state prior to creating the page?


Answers:
author: Alex Medved _ConfiForms_
body: Hi [@MCL](/t5/user/viewprofilepage/user-id/5092882) and welcome to this community

\[entry.field_name\] references are not wiped out.. they are evaluated agains the record that is used to execute this IFTTT

And the body of the IFTTT is evaluated to process all the references to get the values.

Have a look at asEntryRef function <https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions>

Alex

comments: author: MCL
body: I may not have explained it well enough, but I have nested IFTTTs, I am trying to pass the IFTTT 2 into the next page to allow for a JIRA ticket to be created.

Kind of looks like below. I am not collecting the data from the current form, yet passing a form to another page that has the "Create JIRA" functionality embedded.

IFTTT 1 to create the page

- IFTTT 2 to create the JIRA ticket

- - IFTTT 2 - Code block

```
{ "fields": { "project":{ "key": "[entry.keyName]" }, "parent": { "key": "[entry.key]" }, "summary": "[entry.summary.escapeJSON]", "description": "[entry.description.escapeJSON]", "issuetype":{"name": "[entry.issuetype.label]"}, "labels" : [entry.tag.label] } }
```

*** ** * ** ***

New page

IFTTT 2 - Code Block

```
{ "fields": { "project":{ "key": "" }, "parent": { "key": "" }, "summary": "", "description": "", "issuetype":{"name": ""}, "labels" : } }
```


author: MCL
body: I have not yet delved into the virtual functions, would that solve the issue above where the creation of the page is failing to send the values to the new page?


author: Alex Medved _ConfiForms_
body: Why at all do yoiu want to create a page with inner form? Why not to have a form defined elsewhere and on a created page you will have only a form view (ConfiForms FormView Registrations Control macro)?

Anyway, it is your choice... but the comment I have provided answers your question... use asEntryRef

```
... { "key": "[entry.id.asEntryRef(entry.keyName)]" }...
```

etc..

Alex


author: MCL
body: I have a strong distaste for using the "create page from template" pop up menu so I created a page that generates pages for me saving me quite a bit of time.

Reasons im trying this method:

1. The time to create a mundane meeting minutes page from the template takes on average and extra 3 clicks and I still end up in the "edit page" section that I want to exit out of.

2. The page isnt dynamically created based on simple questions I want to input at the time of creation.

Thank you very much again for your expedient response.


author: MCL
body: I like your approach, just getting started with confiforms and had no idea about the formView macro. May need to research how to do that functionality.


author: Alex Medved _ConfiForms_
body: So the ConfiForms Form Definition and all the stuff related to the form configuration will be on some dedicated page (the for that creates Jira issues)

And your other form (current one, which creates pages) will still create pages, but that page will have only the ConfiForms FormView Registrations Control macro (that is linked to that form on a dedicated page)

Much easier to maintain later.. otherwise you will have own form on a created page that you need to maintain (for example change the mappings or something like that)

Alex


Tags: confiforms

confluence-server

ifttt

issue-create

server