Problem with Autonumber ConfiForms
Asked by Franz Kircher:

Hello  

I use Autonumber as an ID for a ConfiForm.

My problem is, that always a record is edited the ID changes. That means not every number is an ID for a record anymore (no problem for me) and some records have the same ID (a big problem for me).

Can someone please help me with this?  

Everytime a record is edited a Jira Issue is created and the Issue key is saved back to the form using a IFTTT integration rule that sets these parameters: "entryId=\[entry.id\] \& JiraTicket=${iftttResult_0}". Does this anything have to do with this?  
![ID Problem.png](/t5/image/serverpage/image-id/166067iCB83B9FDC8F5E2A5/image-size/large?v=v2&px=999 "ID Problem.png")


Answers:
author: Alex Medved _ConfiForms_
body: Hi

Do you have and IFTTT that is set up top create a Jira issue onModified event in ConfiForms?

I am not sure I get the issue with autonumber though - what is this ID column and how is it constructed / saved?

Alex

comments: author: Franz Kircher
body: Hi  

Yes, I have an IFTTT that creates a Jira issue onModified.

<br />

It is just a simple Autonumber field, starting from 0 and increasing the number by 1 for each record. It is used to uniquely identify the record. Is there a better solution for this?


author: Alex Medved _ConfiForms_
body: And what is the condition to created Jira issue onModified event?

Could you share your configuration here, as it does not make sense to see the autonumber to be so dramatically duplicated.

May I see how the form is configured? Storage format will be just fine - you can open support ticket with us - this would be faster to troubleshoot. <https://wiki.vertuna.com/display/VERTUNA/Support+Request+Form>

Alex


author: Franz Kircher
body: There is a field holding a Jira Issue. The condition to create a new Jira Issue onModiefied is, if that field is empty.

What exactly do you mean with configuration?

Here is the important part in Storage format, if you also need the rest, please let me know :)  
\*Edit: Sorry, that block is quite long and I couldn't find a possibility to make it scrollable :(  

```
</p>
<h1>Def Fields</h1>
<ac:structured-macro ac:macro-id="287c386d-c177-4a62-be93-f679fdee70c5" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="autocomplete">true</ac:parameter>
<ac:parameter ac:name="enableAudit">true</ac:parameter>
<ac:parameter ac:name="formName">Fields</ac:parameter>
<ac:parameter ac:name="export">true</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="7ff5f9a2-57e3-4d5d-9b0a-717386839d9c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">FieldID</ac:parameter>
<ac:parameter ac:name="fieldLabel">ID</ac:parameter>
<ac:parameter ac:name="values">:0</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">auto</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="71d92d8c-57b8-4ae3-aa8c-a672432c5942" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ModelColumnName</ac:parameter>
<ac:parameter ac:name="fieldLabel">ModelColumnName</ac:parameter>
<ac:parameter ac:name="values">[299563351|Fields|ModelObjectName|true|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="afb8263c-4762-40e9-bc90-2dfb4550e8e0" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ModelObjectName</ac:parameter>
<ac:parameter ac:name="fieldLabel">ModelObjectName</ac:parameter>
<ac:parameter ac:name="values">[299563351|Tables|TableName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">smartselect</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="f0f15a58-85b3-4601-b068-80668fcbe57d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">SourceMapping</ac:parameter>
<ac:parameter ac:name="fieldLabel">SourceMapping</ac:parameter>
<ac:parameter ac:name="values">[299563351|Tables|TableName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5dad6500-f5aa-48ea-8df0-e69458224853" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Domain</ac:parameter>
<ac:parameter ac:name="fieldLabel">Domain</ac:parameter>
<ac:parameter ac:name="values">false[1=Common|2=Common Subject Area|3=Event|4=Locator|5=Party|6=Product|7=Purchuase Order Area|8=Resource Item|]</ac:parameter>
<ac:parameter ac:name="extras">label;false</ac:parameter>
<ac:parameter ac:name="type">select</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c91fb3c6-e8d2-4168-9543-a167b6c81eda" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Object</ac:parameter>
<ac:parameter ac:name="fieldLabel">Object</ac:parameter>
<ac:parameter ac:name="values">[299563351|Fields|Object|false|false]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">dynamicselect</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d5727f39-0c77-41fe-91ea-8e3196e24c5e" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Attribute</ac:parameter>
<ac:parameter ac:name="fieldLabel">Attribute</ac:parameter>
<ac:parameter ac:name="values">[299563351|Tables|TableName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="cddb57fb-165d-4dc3-b5e3-b0951d5cf56c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">BusinessDescriptionEN</ac:parameter>
<ac:parameter ac:name="fieldLabel">BusinessDescriptionEN</ac:parameter>
<ac:parameter ac:name="values">[299563351|Tables|TableName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">textarea</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="91d80d88-e047-4647-a40d-143cb6ef7ffd" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">FieldComment</ac:parameter>
<ac:parameter ac:name="fieldLabel">FieldComment</ac:parameter>
<ac:parameter ac:name="values">[299563351|Tables|TableName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">textarea</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c7125ab6-2d4b-4cb8-8a79-77954823d87b" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Report</ac:parameter>
<ac:parameter ac:name="fieldLabel">Report</ac:parameter>
<ac:parameter ac:name="values">[299563351|Reports|ReportName|false|false|]</ac:parameter>
<ac:parameter ac:name="extras">false[]</ac:parameter>
<ac:parameter ac:name="type">smartmultiselect</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="536f75eb-218c-4854-a3c3-dd84b1db4f3c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">JiraTicket</ac:parameter>
<ac:parameter ac:name="fieldLabel">JiraTicket</ac:parameter>
<ac:parameter ac:name="values">:0</ac:parameter>
<ac:parameter ac:name="extras">JIRA</ac:parameter>
<ac:parameter ac:name="fieldDescription">Will be filled automatically</ac:parameter>
<ac:parameter ac:name="type">jira</ac:parameter>
</ac:structured-macro>
</p>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="f7acf28b-6657-4347-a32b-8def6685b216" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Create JIRA Issue</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="99d34064-d1cf-4a4b-91ab-0d7ee4d59f4a" ac:name="noformat" ac:schema-version="1">
<ac:plain-text-body><![CDATA[#if("[entry.ModelColumnName]"=="")
#set($summary = "[entry.Attribute] || [entry.Object] || [entry.Domain.name]") 
#else
#set($summary = "[entry.ModelColumnName] || [entry.ModelObjectName]")
#end

{
"fields": {
"project": {"key": "TDA"},
"summary": "$summary",
"issuetype": {"name": "Design-Task"},
"labels": ["DM"],
"assignee": {"name": "[entry._user.name]"}
}
}]]></ac:plain-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="49bb4488-f743-49a0-b3f2-fd49f955199d" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="extras3">true</ac:parameter>
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id] &amp; JiraTicket=${iftttResult_0}</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<br/>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="42ec4157-4275-4076-aeb8-8956eaa57e30" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">JiraTicket:[empty] AND hasChanged(Report):false</ac:parameter>
<ac:parameter ac:name="action">Create JIRA Issue</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="extras2">[entry.JiraTicket]</ac:parameter>
<ac:parameter ac:name="resultName">result_onModify_newTicket</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="6573cd3f-2fee-4d4c-9b84-62f6d8de3027" ac:name="noformat" ac:schema-version="1">
<ac:plain-text-body><![CDATA[#if("[entry.ModelColumnName]"=="")
#set($summary = "[entry.Attribute] || [entry.Object] || [entry.Domain.name]") 
#else
#set($summary = "[entry.ModelColumnName] || [entry.ModelObjectName]")
#end

{
"fields": {
"project": {"key": "TDA"},
"summary": "$summary",
"issuetype": {"name": "Design-Task"},
"labels": ["DM"],
"assignee": {"name": "[entry._user.name]"}
}
}]]></ac:plain-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="e7efed28-6109-45b3-b0b1-cf98f10ce025" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">!JiraTicket:[empty]</ac:parameter>
<ac:parameter ac:name="action">Update JIRA Issue</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="extras2">[entry.JiraTicket.key]</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="947204fb-3719-4377-aea7-4ccbefa33732" ac:name="noformat" ac:schema-version="1">
<ac:plain-text-body><![CDATA[#if("[entry.ModelColumnName]"=="")
#set($summary = "[entry.Attribute] || [entry.Object] || [entry.Domain.name]") 
#else
#set($summary = "[entry.ModelColumnName] || [entry.ModelObjectName]")
#end

{
"fields": {
"project": {"key": "TDA"},
"summary": $summary,
"issuetype": {"name": "Design-Task"},
"labels": ["DM"]
}
}]]></ac:plain-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="db39a4d5-34ad-4d46-b23f-6fab04c2c6a9" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">JiraTicket:[empty] AND hasChanged(Report):false</ac:parameter>
<ac:parameter ac:name="extras3">true</ac:parameter>
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id] &amp; JiraTicket=${iftttResult_result_onModify_newTicket}</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p>
<br/>
</p>
```


author: Alex Medved _ConfiForms_
body: OK, quick check reveals the problematic place

```
entryId=[entry.id] & JiraTicket=${iftttResult_0}
```

Is different from

```
entryId=[entry.id]&JiraTicket=${iftttResult_0}?
```

Which means, you never really update the field, but create a new one (with ID followed by "space" and with original ID)

We dont trim the instructions, and that is intentional

So, remove the spaces around \&

Alex


author: Franz Kircher
body: Oh wow, I never expected spaces to be a problem :D But it makes sense.

Thanks for your help, I'm happy that the solution is quite easy.  

Is there a way to "fix" the duplicate IDs?


author: Alex Medved _ConfiForms_
body: Duplicates are actually related to this slight misconfiguration, as it made ConfiForms to clone the record instead of creating new

And yes, there is one admin service that could help you to fix this <https://wiki.vertuna.com/display/CONFIFORMS/Release+Notes#ReleaseNotes-Version2.0.10>

Alex


Tags: confiforms

confluence-server

server