Categorie: reference Bijgewerkt: 2026-04-08 actionfield workflow actionfield645

ActionField645

Beschrijving: Calculate NextDate (with LastDate and frequency) for InspectionLine. Custom: Nee

Propertiesbewerken

Property Type Accessor
InspectionLine InspectionLine Root
YearsInPast Int16 Optional

XMLbewerken

<Workflow Name="ActionField645" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Calculate NextDate (with LastDate and frequency) for InspectionLine.</Description>
	<Properties>
		<Property	Name="InspectionLine"	Type="InspectionLine"	Accessor="Root"		Direction="In" />

		<Property	Name="YearsInPast"		Type="Int16"			Accessor="Optional"	Direction="In"		Default="30"	Comment="Number of years the date may be in the past." />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<When Name="LastDate is not Empty" Condition="${InspectionLine.LastDate} != Empty">
			<Choose>
				<When Name="Date is Old" Condition="#getyear(${InspectionLine.LastDate?}) &lt; #getyear(#addyears(#{Environment.CurrentDateTime}, -${YearsInPast}))">
					<Message Name="ShowMessage3646" MessageCode="3646">
						<Parameter	Name="YearsInPast"	Direction="In"		Value="${YearsInPast}" />
					</Message>

					<Transaction>
						<Assign Name="EmptyLastDate" Property="${InspectionLine.LastDate}" Value="Empty" />
					</Transaction>
				</When>

				<Otherwise>
					<Transaction>
						<Command Name="Update next date" CommandName="InspectionLine_CalculateNextDate">
							<Parameter	Name="InspectionLine"	Direction="In"		Value="${InspectionLine}" />
						</Command>
					</Transaction>
				</Otherwise>
			</Choose>
		</When>

		<UserContent Name="Post" />
	</Execution>
</Workflow>