With ConfiForms record you always have access to metadata fields such as
ConfiTemplates Smart Template | ||||||
---|---|---|---|---|---|---|
|
...
...
Info |
---|
There is a similar demo on tracking last updated time together with a last updater: Tracking user and last updated time |
Accessing this fields is the same as accessing the fields you define
...
ConfiForms Form Definition | ||
---|---|---|
| ||
|
...
We can build a simple CardView over it's data and to show a createdBy field in addition to defined "mytextfield"
...
ConfiForms CardView | ||
---|---|---|
| ||
Info |
---|
However, ConfiForms does NOT track the last updater by default, but it can be easily added |
...
We will use the same form, add a hidden field to store the last updater and update this field with IFTTT on record create and record update
...
Modifying the CardView like this:
Complete storage format for the solution
Code Block |
---|
<ac:structured-macro ac:macro-id="ea4ce2ca-5009-4af2-a354-c5126a50fcef" 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="37fd2753-23c4-436c-bb5e-d9ffce5a3f2f" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:parameter ac:name="restrictions">sash</ac:parameter> <ac:rich-text-body> <p> </p> </ac:rich-text-body> </ac:structured-macro> <p> <ac:structured-macro ac:macro-id="ed12368a-7dcf-4d19-9f2b-563feaf83ff6" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mytextfield</ac:parameter> <ac:parameter ac:name="fieldLabel">My text field</ac:parameter> <ac:parameter ac:name="type">text</ac:parameter> </ac:structured-macro> </p> <p> <ac:structured-macro ac:macro-id="b87d1150-2428-4a77-a0b5-7b0710e79759" 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> <ac:structured-macro ac:macro-id="e76faef8-953b-4a36-8e7b-ce5ec85c0edb" 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]&updatedBy=[entry._user]</ac:parameter> <ac:rich-text-body> <p> </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]&updatedBy=[entry._user]</ac:parameter> <ac:rich-text-body> <p> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="691c19c2-afa5-4847-8442-6e59f08e4178" ac:name="confiform-card" ac:schema-version="1"> <ac:parameter ac:name="formName">f<>f1</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="c1f02f2f-6a83-4151-9b68-b36fb6772717" ac:name="confiform-field" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mytextfield</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> </ac:rich-text-body> </ac:structured-macro> |
...