Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there any way to export a record set from a form and include the ID of the record?
I need some way to uniquely identify each record in the export. Alternatively is there a field I can use to generate the ID and include in my record set
Comment author was deleted
Hi,
Should be possible with a simple xslt update, all export types are basicly xslt transformations
You can find the xslt files that are used in the \umbraco\plugins\umbracoContour\xslt directory
/excel.xslt/Html.xslt/xml.xslt
It is included in the xml export
So should be an easy update if you want to add it to the excell or html export (the id child element of each uformrecord element)
Cool, easy does it
Hi this is my excel.xml
I what to get Record Id on "Save to excel".
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="urn:my-scripts"> <xsl:output method="text" indent="no" encoding="utf-8" /> <xsl:param name="records" /> <xsl:template match="/"> "State","Submitted","PageId","IP","MemberId",<xsl:for-each select="$records//uformrecord[1]/fields/child::*"><xsl:sort select="caption" order="ascending"/><xsl:if test="position() != last()">"<xsl:value-of select="normalize-space(translate(caption,',',''))"/>",</xsl:if><xsl:if test="position() = last()">"<xsl:value-of select="normalize-space(translate(caption,',',''))"/>"<xsl:text>
</xsl:text></xsl:if></xsl:for-each> <xsl:for-each select="$records//uformrecord">"<xsl:value-of select="state"/>","<xsl:value-of select="updated"/>","<xsl:value-of select="pageid"/>","<xsl:value-of select="ip"/>","<xsl:value-of select="memberkey"/>",<xsl:for-each select="./fields/child::*"><xsl:sort select="caption" order="ascending"/><xsl:if test="position() != last()"><xsl:choose><xsl:when test="count(values//value) > 1">"<xsl:for-each select="values//value"><xsl:if test="position() != last()"><xsl:value-of select="normalize-space(translate(.,',',''))"/>;</xsl:if><xsl:if test="position() = last()"><xsl:value-of select="normalize-space(translate(.,',',''))"/></xsl:if></xsl:for-each>",</xsl:when><xsl:otherwise>"<xsl:value-of select="normalize-space(translate(values//value,',',''))"/>",</xsl:otherwise></xsl:choose></xsl:if><xsl:if test="position() = last()"><xsl:choose><xsl:when test="count(values//value) > 1">"<xsl:for-each select="values//value"><xsl:if test="position() != last()"><xsl:value-of select="normalize-space(translate(.,',',''))"/>;</xsl:if><xsl:if test="position() = last()"><xsl:value-of select="normalize-space(translate(.,',',''))"/></xsl:if></xsl:for-each>"</xsl:when><xsl:otherwise>"<xsl:value-of select="normalize-space(translate(values//value,',',''))"/>"</xsl:otherwise></xsl:choose><xsl:text>
</xsl:text></xsl:if></xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Record ID
Is there any way to export a record set from a form and include the ID of the record?
I need some way to uniquely identify each record in the export. Alternatively is there a field I can use to generate the ID and include in my record set
Comment author was deleted
Hi,
Should be possible with a simple xslt update, all export types are basicly xslt transformations
You can find the xslt files that are used in the \umbraco\plugins\umbracoContour\xslt directory
/excel.xslt
/Html.xslt
/xml.xslt
Comment author was deleted
It is included in the xml export
So should be an easy update if you want to add it to the excell or html export (the id child element of each uformrecord element)
Cool, easy does it
Hi this is my excel.xml
I what to get Record Id on "Save to excel".
is working on a reply...