Can someone point out if its possible to retrieve the number of records in contour or make an increment for each records ?
What i would like to do is be able to make a Ref Number automatically for each records in contour. For each records it will send an automatic xslt transformed email with date and ref.
Something like Ref: VREAS-dd-mm-yyyy-01 (01 here is the number of record) and so on.
I was thinking of pulling the records id instead but it way too long event if i trim to .
Thanks for the Url, this seems to be the way it will make it work but how will this ID be added in the entries of Contour. How will the admin get the ID in the entries here ?
Ah you also need it there, you then maybe just add a hidden field and populate that with the db value from a workflow , you won't need the xslt extension then
This is exactly what i wanted to do using workflow with a hidden field using Post as XML right? What does the Alias and Url stands for in the workflow ? and which method do i used
Increment Records
Hi guys,
Can someone point out if its possible to retrieve the number of records in contour or make an increment for each records ?
What i would like to do is be able to make a Ref Number automatically for each records in contour. For each records it will send an automatic xslt transformed email with date and ref.
Something like Ref: VREAS-dd-mm-yyyy-01 (01 here is the number of record) and so on.
I was thinking of pulling the records id instead but it way too long event if i trim to .
Any thoughts how to achieve this ?
//fuji
Comment author was deleted
Hey Fuji,
Think counting isn't save since what happens when a record get's deleted...
So what I would suggest is to add a new column to the ufrecord db table, just an column of type int that will auto increment
THen you'll just need a helper method to get that id based on the guid :)
Ok lets try this!! :)
It seems to be working in the db for each entry, but how to pull the data in xslt transformed.
The entry is not considered as part of the xml right?
Hi Tim, how do I include this in my xml or retrieve this value ?
Comment author was deleted
With a helper :) just make an xslt extension and you should be able to call that from inside the xslt
Comment author was deleted
Or use http://our.umbraco.org/projects/developer-tools/sql-for-xslt-(jespercom)
Hi Tim,
Thanks for the Url, this seems to be the way it will make it work but how will this ID be added in the entries of Contour. How will the admin get the ID in the entries here ?
//fuji
Comment author was deleted
Ah you also need it there, you then maybe just add a hidden field and populate that with the db value from a workflow , you won't need the xslt extension then
This is exactly what i wanted to do using workflow with a hidden field using Post as XML right? What does the Alias and Url stands for in the workflow ? and which method do i used
Comment author was deleted
Details on workflows can be found here http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Extending-Contour/
Default providers sourcecode here http://t.co/0mmT4XJRur
Should give you enough details to get started :)
Thanks Tim but no sure how to get started here ! :(
Comment author was deleted
Have you taken a look at the default workflow code?
From the umbraco. Forms solution i had a look at the PostAsXML.cs file.
Since contour 3.0 is fully customizable cant i create a nee textField with the FieldType.Textfield.cshtml to pull the data or FieldType.HiddenField ?
Tim, I started with the umbraco.Forms.Core providers but can add umbraco.Forms.Core Reference to run it.
is working on a reply...