Confiform auto run "Set Value" action on Rules Macro

Ansar Rezaei
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.
April 23, 2019

Hi
I have a form and I need to change the value of specific field to default value after 10 days of last updated date. I create a form and hold  update date on a field using ifttt macro. When I update date field  manually Rule works fine, but I need to execute automatically on page/form load. Could you help me what's wrong with it? Is this senario possible with confiform or not?

==================================================================

<ac:structured-macro ac:macro-id="848cb8f1-87c8-4c75-a16a-f7ae12b18adc" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="6e70de46-02f5-4244-ae5a-f3aeab659475" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="2c376518-07b1-4636-8a00-825f710b511d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">status</ac:parameter>
<ac:parameter ac:name="fieldLabel">My text field</ac:parameter>
<ac:parameter ac:name="values">false[success=a|error=B|current=C|]</ac:parameter>
<ac:parameter ac:name="type">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="da4d3518-caf6-45da-addd-07ccf86a369f" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedBy</ac:parameter>
<ac:parameter ac:name="fieldLabel">Updated by:</ac:parameter>
<ac:parameter ac:name="type">hidden</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="2453f5bc-edf3-49ec-a36d-09cc010f4e76" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedDate</ac:parameter>
<ac:parameter ac:name="fieldLabel">Updated Date:</ac:parameter>
<ac:parameter ac:name="type">datetime</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a8471e73-68e8-4773-82a6-cb2ca97301b7" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">updatedDate:&lt;[now]-60</ac:parameter>
<ac:parameter ac:name="values">status=current</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="4b4e1bc5-9432-48e3-8968-7e37295cce44" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedBy=[user]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="535006ce-b3d9-4698-9356-0db560fb3499" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedDate=[now]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="207991aa-4e6c-4194-8310-bb48ad407b7b" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedBy=[user]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="cac9e48a-eecd-4a34-a5dd-15ff7f82e235" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedDate=[now]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="90673f38-7f9a-4be6-ad3c-5f46943c1948" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="89b28b74-64ea-4082-b0a4-bc5f637ff28d" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d9a2031a-caeb-48e9-88d6-5829ab13dc7a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">createdBy</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c90c2b7d-dcd6-4d13-939e-80d103d16c04" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedBy</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4e43bb45-b9cc-46c3-9c0a-bf356d704a15" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedDate</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="09d9b4f1-a87c-4642-a3b8-75a58bc66f30" ac:name="confiform-entry-edit" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>

 

3 answers

2 votes
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.
April 24, 2019

There is no background process / scheduler in ConfiForms and you need to instantiate the update process elsewhere (CRON using ConfiForms REST API)

Or, as you have mentioned - add the REST API call to ConfiForms API on page load.

Update specific field seems to be appropriate here. You can set the filter to execute update only on the records matching your criteria

Ansar Rezaei
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.
April 24, 2019

Hi Alex
You always have some advice and I really Appreciate it.

Could you explain it a bit more? I didn't know how to add the REST API call to ConfiForms API on page load?

Ansar Rezaei
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.
April 24, 2019

Hi

Did you mean something like this?

curl -u admin:admin -X POST "http://192.168.41.239:8090/confluence/ajax/confiforms/rest/update.action?pageId=6555970&f=f1&q=updatedDate:<[now]-60&fv=status:success"
Like Wade Meredith likes this
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.
April 25, 2019

I don't really know how you can call a curl from a web page... I was more towards using jQuery with something like this

 

<script type="text/javascript">
AJS.toInit(function() {
var xhr = AJS.$.ajax({
url: AJS.params.contextPath + '/ajax/confiforms/rest/update.action?pageId=6555970&f=f1&q=updatedDate:<[now]-60&fv=status:success',
type: 'GET',
timeout: 20000, // 20 sec
success: function (data) {
// handle success
},
error: function (jqXHR, textStatus, errorThrown) {
// handle error
}
});
});
</script>

However, as this will be loaded after the page is rendered then it will show the data from ConfiForms as it was before the update 

 

The best option to do anything like this is to use something like a CRON or another type of scheduler of choice and setup a call to ConfiForms REST API

Ansar Rezaei
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.
April 25, 2019

Hi

I try to did it manually using an empty form and a register button and an ifttt macro on it, but it show some error. The top form is my main form and the bottom form I used for call Webservice Request.

<ac:structured-macro ac:macro-id="848cb8f1-87c8-4c75-a16a-f7ae12b18adc" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="6e70de46-02f5-4244-ae5a-f3aeab659475" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="2c376518-07b1-4636-8a00-825f710b511d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">status</ac:parameter>
<ac:parameter ac:name="fieldLabel">My text field</ac:parameter>
<ac:parameter ac:name="values">false[success=a|error=B|current=C|]</ac:parameter>
<ac:parameter ac:name="type">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="da4d3518-caf6-45da-addd-07ccf86a369f" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedBy</ac:parameter>
<ac:parameter ac:name="fieldLabel">Updated by:</ac:parameter>
<ac:parameter ac:name="type">hidden</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="2453f5bc-edf3-49ec-a36d-09cc010f4e76" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedDate</ac:parameter>
<ac:parameter ac:name="fieldLabel">Updated Date:</ac:parameter>
<ac:parameter ac:name="type">datetime</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c382805e-c34c-4f74-8a46-c63235e4aea4" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">updatedDate:&lt;[now]-60</ac:parameter>
<ac:parameter ac:name="values">status=success</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="4b4e1bc5-9432-48e3-8968-7e37295cce44" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedBy=[user]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="535006ce-b3d9-4698-9356-0db560fb3499" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedDate=[now]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="207991aa-4e6c-4194-8310-bb48ad407b7b" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedBy=[user]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="cac9e48a-eecd-4a34-a5dd-15ff7f82e235" ac:name="confiform-ifttt" ac:schema-version="1">
<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;updatedDate=[now]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="90673f38-7f9a-4be6-ad3c-5f46943c1948" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">f1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="89b28b74-64ea-4082-b0a4-bc5f637ff28d" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d9a2031a-caeb-48e9-88d6-5829ab13dc7a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">createdBy</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="c90c2b7d-dcd6-4d13-939e-80d103d16c04" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedBy</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4e43bb45-b9cc-46c3-9c0a-bf356d704a15" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">updatedDate</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="09d9b4f1-a87c-4642-a3b8-75a58bc66f30" ac:name="confiform-entry-edit" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="337954bc-3b58-4c02-8ff5-a38fdf199fcb" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">updatetable</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="9e650e74-b652-46f7-a7aa-772416edca50" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="registrationButtonLabel">بروزرسانی</ac:parameter>
<ac:parameter ac:name="embedded">true</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="dc6b1776-0f55-4ad0-93b5-d423595d713b" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">WebService Request</ac:parameter>
<ac:parameter ac:name="extras">a2c18f37c29299af8db8230ec35e59cd</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">/ajax/confiforms/rest/update.action?pageId=6555970&amp;f=f1&amp;q=updatedDate:&lt;[now]-60&amp;fv=status:success</ac:parameter>
<ac:parameter ac:name="who">GET</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>

This is my form and I set web service connection without content-type:application/json header in ConfiForms app configuration

It show me this error:

Invalid uri 'http://192.168.41.239:8090/confluence/ajax/confiforms/rest/update.action?pageId=6555823&f=s1&q=updatedDate:<1556192948303-60&fv=status:success': Invalid query

I think there is somthing wrong with my filter

q=updatedDate:<1556192948303-60

Does It has an specific format?

Ansar Rezaei
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.
April 29, 2019

Hi Alex

Any update?

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.
April 30, 2019

Why at all have the ConfiForms IFTTT to use ConfiForms REST API to update the records and not to use specifically designed ConfiForms IFTTT action called "Update ConfiForms entries by filter" !?

As for the filter/query

q=updatedDate:<[now]-60

This makes very little sense actually, as you operate here with timestamps and that means you check the updatedDate to be just 60 milliseconds before now

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.
April 30, 2019

As for the "invalid query" error, then please do url encode the < parameter

 

...q=updatedDate:%3C[now]-60&fv=status:success
0 votes
its moi March 27, 2020

Hi there. 

I am struggling with something similar: 

  • FieldA is a text field
  • FieldB is a date field
  • FieldA should have value X when FieldB:<[today] 
  • FieldA should have value Y whend FieldB:>=[today]

I am trying to set this with 'set value' in Rules for Field Definition. But currently the correct value is only set when I edit a record first. 

I want to have the correct value in FieldA shown automatically whenever the page is loaded. How?

Thanks :) 

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.
March 27, 2020

Do you have your rules set to track the changes in "FieldB"? In other words, do you have the first parameter in your rules to be FieldB?

its moi March 27, 2020

@Alex Medved _ConfiForms_ 

I have just checked and maybe I did not have this right. I can only see if it works when the date changes, so I can only tell in 80 minutes from now. 

Thanks for looking into this as always :) 

This is my source if you are interested, my question was just a simplified example of this.

<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="e1bb135a-81b3-470b-b077-332521004209" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">Lieferantenmanagement</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">Lieferantenmanagement</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="fa49b504-088d-4fd8-b79e-e68784b7c31a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">projektname</ac:parameter>
<ac:parameter ac:name="fieldLabel">Projektname</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="7378fc4b-2554-4bf7-bb95-132f2e140dfc" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">lieferant</ac:parameter>
<ac:parameter ac:name="fieldLabel">Lieferant</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="ce46a1ae-9893-40d4-a849-38ee02eae914" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">kon</ac:parameter>
<ac:parameter ac:name="fieldLabel">Start Konstruktion</ac:parameter>
<ac:parameter ac:name="type">date</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="2e8f4c17-e29d-4c71-a619-52714d91ab58" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">her</ac:parameter>
<ac:parameter ac:name="fieldLabel">Start Herstellung</ac:parameter>
<ac:parameter ac:name="type">date</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="840ac4b6-0014-4e30-8950-a909df1e92d3" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">aus</ac:parameter>
<ac:parameter ac:name="fieldLabel">Start Auslieferung</ac:parameter>
<ac:parameter ac:name="type">date</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="15d7e49d-3c3c-4d5a-aa7b-0cc3b3334ddf" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ueb</ac:parameter>
<ac:parameter ac:name="fieldLabel">Anlage Übernommen</ac:parameter>
<ac:parameter ac:name="type">date</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p>Konstruktion</p>
<p>
<ac:structured-macro ac:macro-id="f48eb604-3689-4592-a3ff-da4b85062477" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">konphase</ac:parameter>
<ac:parameter ac:name="fieldLabel">Konstruktionsphase</ac:parameter>
<ac:parameter ac:name="values">false[default=ausstehend|moved=in Bearbeitung|success=abgeschlossen|]</ac:parameter>
<ac:parameter ac:name="type">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b97a33ca-749e-45be-b4b1-916e010087dd" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">konphase:*</ac:parameter>
<ac:parameter ac:name="fieldName">konphase</ac:parameter>
<ac:parameter ac:name="action">Hide field</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>Setzen Status für konphase</p>
<p>
<ac:structured-macro ac:macro-id="0da08936-a565-4485-95d3-fd607ac8202e" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">kon:&gt;[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;konphase=default</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">kon</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="1fc11438-982c-4768-bd67-d52c6e25221e" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">kon:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;konphase=moved</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">kon</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="8c33595f-c5f0-4d0a-aa54-0e0d0baa47c6" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">her:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;konphase=success</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">her</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>Herstellung</p>
<p>
<ac:structured-macro ac:macro-id="7e4a89c2-f5fb-464b-b2b6-90bbbbfe27c6" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">herphase</ac:parameter>
<ac:parameter ac:name="fieldLabel">Herstellungsphase</ac:parameter>
<ac:parameter ac:name="values">false[default=ausstehend|moved=in Bearbeitung|success=abgeschlossen|]</ac:parameter>
<ac:parameter ac:name="type">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="48525165-e5bd-4e3d-81fa-029419e7fa7b" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">herphase:*</ac:parameter>
<ac:parameter ac:name="fieldName">herphase</ac:parameter>
<ac:parameter ac:name="action">Hide field</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>Setzen Status für herphase</p>
<p>
<ac:structured-macro ac:macro-id="dd49694a-6a20-4c5f-a273-784d8a85ce2e" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">her:&gt;[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;herphase=default</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">her</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="56bf69f3-1951-425f-b4af-0815cac55244" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">her:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;konphase=moved</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">her</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="ba4f2d4d-98b3-4d60-9308-fcd5d7b98e9b" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">aus:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;herphase=success</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">aus</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>Auslieferung</p>
<p>
<ac:structured-macro ac:macro-id="1ee4e219-ac59-4232-a3ce-8789e5624b7f" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ausphase</ac:parameter>
<ac:parameter ac:name="fieldLabel">Auslieferungsphase</ac:parameter>
<ac:parameter ac:name="values">false[default=ausstehend|moved=in Bearbeitung|success=abgeschlossen|]</ac:parameter>
<ac:parameter ac:name="type">status</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d098d520-043d-43af-bdad-3796f48f4471" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">ausphase:*</ac:parameter>
<ac:parameter ac:name="fieldName">ausphase</ac:parameter>
<ac:parameter ac:name="action">Hide field</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>Setzen Status für ausphase</p>
<p>
<ac:structured-macro ac:macro-id="1a702e50-5355-4df4-bc31-1c22d08522d6" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">aus:&gt;[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;ausphase=default</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">aus</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="7ccc9213-8574-444e-ac5d-aa1fce58660a" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">aus:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;ausphase=moved</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">aus</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b9b1aa80-6412-449a-98e2-090c1800f0f6" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">ueb:&lt;=[today]</ac:parameter>
<ac:parameter ac:name="values">entryId=[entry.id]&amp;ausphase=success</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">ueb</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="4adfa216-f0b3-4b0a-a5b9-9556e9c81c05" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="embedded">true</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<h1>ALLE EINTRÄGE</h1>
<ac:structured-macro ac:macro-id="8c1bb2e5-a797-40f1-bcda-adeb63816cc8" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">Lieferantenmanagement</ac:parameter>
<ac:parameter ac:name="showRecordsCount">true</ac:parameter>
<ac:parameter ac:name="enableSearch">true</ac:parameter>
<ac:parameter ac:name="showRecordsCountLabel">Maschinen im Zulauf</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="6ce5b1a4-343e-4c5e-9544-7d210d36f7f0" ac:name="confiform-entry-viewer" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="00266cdc-d5ab-4b1b-9fca-9cf526f5bf8c" ac:name="confiform-entry-edit" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="ca97f7bb-68bf-4076-af7d-00a76777e7b6" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">heute</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="16e8a059-ac65-44b3-8037-d77bcba28326" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">projektname</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a177ae17-a944-49d1-84fa-fc64771902e0" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">lieferant</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="ccf54240-68e8-4276-8fac-9f648cdbdeea" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">kon</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4c9013cf-0eaa-490e-9beb-fced0dab91c7" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">konphase</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0b8467b7-e5d1-4c3a-bbe2-c87cf70d3ffb" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">her</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b8ddfaed-e460-4dcb-8556-7bb20208b094" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">herphase</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="fab8978e-5f94-4d0e-a38b-07a0ca673f96" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">aus</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="8bb5e5e9-56e4-46b2-aa4c-1785ab50618a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ausphase</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<strong style="letter-spacing: 0.0px;">
<br/>
</strong>
</p>
<p>
<br/>
</p>
<p class="auto-cursor-target">
<strong>
<br/>
</strong>
</p>
<p class="auto-cursor-target">
<strong>
<br/>
</strong>
</p>
<p>
<br/>
</p>

 

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.
March 28, 2020

Not sure I fully understood your comment... 

As for the field definition rules:

  • you can have rules what are executed on form load
  • you can have rules what are bound to field and react on field value changes

From your first message I got an impression that you have your rules configured to execute on form load and suggested to change them to be bound to the field you want to track for changes

anuradha govindan July 9, 2020

How do you get the rules to execute when the form loads. I have a rule to update the value of a status field based on date in the table view macro. But when the form loads it does not update the status.

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.
July 9, 2020

ConfiForms Field Definition Rules what are not bound to a field (change) are loaded when the form loads

Screenshot 2020-07-09 at 18.28.35.png 

anuradha govindan July 9, 2020

Thank you for your quick response, I will check this out . 

0 votes
Davin Studer
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.
April 23, 2019

If I understand you correctly it sounds like you are trying to set a field to a specific value when you edit the entry if the last time the record was updated was over ten days ago? If that is so you can use a ConfiForms Rules for Field Definition macro. You would set it to have an "Action to execute" of Set value and set a Condition to look something like this ...

lastUpdated:<[today]-10
Ansar Rezaei
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.
April 23, 2019

Hi

I have status field with A,B and C values. A is default value and users could change it to B. This value must change to C by user action during 10 days and if It doesn't happen it should be automatically change to A.

I need to execute this action automatically each night or on form/page load and didn't require user action.
I have this condition on ConfiForms Rules for Field Definition macro:

updatedDate:<[now]-864000

 I set last updated value on new field that it's name is updatedDate.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events