Jump to content

How do I get the most recent HearingDate?


Recommended Posts

What I want to do is...to determining Hearing Date.

I want to evaluate the Hearing records in the xml document. If more than one Hearing ID is found, use the most recent HearingDate that has passed. Skip records where SettingID/Cancelled = “True”
If multiple hearings are on a case the most recent hearing date should be selected to populate the outbound message.
How do I do this?
xml document
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="DL Notice to DVS" MessageID="67086844" xmlns="">	<Case InternalID="1616832909" ID="11783147" xmlns:user="http://tylertechnologies.com">		<Hearing ID="153546512" InternalHearingEventID="1716143353">			<Setting ID="23490064" InternalSettingID="1623782066" Date="05/14/2014">-->				<HearingDate>01/01/2014</HearingDate>			</Setting>		</Hearing>		<Hearing ID="155794813" InternalHearingEventID="1717919318">			<Setting ID="23727431" InternalSettingID="1623950282" Date="07/09/2014">				<HearingDate>07/09/2014</HearingDate>			</Setting>		</Hearing>		<Hearing ID="158501312" InternalHearingEventID="1720225032">			<Setting ID="24032349" Cancelled="true" InternalSettingID="1624178189" Date="07/11/2014">				<HearingDate>07/11/2014</HearingDate>			</Setting>		</Hearing>		<Hearing ID="158551556" InternalHearingEventID="1720240342">			<Setting ID="24040436" InternalSettingID="1624179819" Date="08/20/2014">				<HearingDate>08/20/2014</HearingDate>			</Setting>		</Hearing>	</Case></Integration>

My xsl line of code to get the HearingDate. I need to check for hearing and select the most recent HearingDate which do not have Hearing/Setting/@Cancelled="true"

<xsl:value-of select="mscef:formatDate(string(Hearing/Setting[not(@Cancelled)]/HearingDate))"/>
Link to post
Share on other sites

I resolved this one......

<xsl:for-each select="Hearing/Setting[not(Cancelled)]">							<xsl:sort select="HearingDate" order="descending"/>							<xsl:if test="position() = 1">								<xsl:value-of select="mscef:formatDate(string(HearingDate))"/>							</xsl:if>						</xsl:for-each>
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...