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

ActionField1082

Beschrijving: Remove a SoftwareInstallation (or actually set SelectedRemovalDate for a SoftwareInstallation, as the record is not deleted from the database). Custom: Nee

Propertiesbewerken

Property Type Accessor
SoftwareInstallation SoftwareInstallation Root
SqlWhereClauseEmp UltimoString Optional

XMLbewerken

<Workflow Name="ActionField1082" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Remove a SoftwareInstallation (or actually set SelectedRemovalDate for a SoftwareInstallation, as the record is not deleted from the database).</Description>
	<Properties>
		<Property	Name="SoftwareInstallation"			Type="SoftwareInstallation"	Accessor="Root"		Direction="In" />

		<Property	Name="SqlWhereClauseEmp"			Type="UltimoString"			Accessor="Optional"	Direction="In"												Comment="Only select Employees with this sqlwhereclause" />

		<Property	Name="CurrentDate"					Type="Date"					Accessor="Internal"						Default="#{Environment.CurrentDate}"	Comment="Today, 0:00hrs" />
		<Property	Name="CurrentUser"					Type="Employee"				Accessor="Internal"						Default="#{User.EmployeeId}" />
		<Property	Name="SelectedInstallationDate"		Type="Date?"				Accessor="Internal" />
		<Property	Name="SelectedInstallationEmployee"	Type="Employee"				Accessor="Internal" />
		<Property	Name="SelectedRemovalDate"			Type="Date?"				Accessor="Internal" />
		<Property	Name="SelectedRemovalEmployee"		Type="Employee"				Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Choose Name="Check if RemovalDate on SoftwareInstallation is empty or not">
			<When Name="When empty" Condition="${SoftwareInstallation.RemovalDate} == Empty">
				<Assign Name="Assign current date for dialog" Property="${SelectedRemovalDate}" Value="${CurrentDate}" />
			</When>

			<Otherwise Name="Otherwise, not empty so use currently assigned">
				<Assign Name="Copy RemovalDate from SoftwareInstallation for dialog" Property="${SelectedRemovalDate}" Value="${SoftwareInstallation.RemovalDate}" />
			</Otherwise>
		</Choose>

		<Choose Name="Check if RemovalEmployee on SoftwareInstallation is empty or not">
			<When Name="When RemovalEmployee is empty" Condition="${SoftwareInstallation.RemovalEmployee} == Empty">
				<Assign Name="Assign current user for dialog" Property="${SelectedRemovalEmployee}" Value="${CurrentUser}" />
			</When>

			<Otherwise Name="Otherwise, not empty so use currently assigned">
				<Assign Name="Copy RemovalEmployee from SoftwareInstallation for dialog" Property="${SelectedRemovalEmployee}" Value="${SoftwareInstallation.RemovalEmployee}" />
			</Otherwise>
		</Choose>

		<Dialog Name="RemoveSoftwareInstallation" TitleCode="REMOVESOFTWAREINSTALLATION">
			<Container Border="True">
				<Date Name="SelectedInstallationDate" Width="100" Value="${SoftwareInstallation.InstallationDate}" ReadOnly="True" LabelCode="DATEINSTALL" EndTimeInput="SelectedRemovalDate" />

				<SelectionList Name="SelectedInstallationEmployee" Value="${SoftwareInstallation.InstallationEmployee}" ColumnName="EmpId" ReadOnly="True" LabelCode="EMPINSTALL" SqlWhereClause="${SqlWhereClauseEmp}" />

				<Date Name="SelectedRemovalDate" Width="100" Value="${SelectedRemovalDate}" OutputProperty="${SelectedRemovalDate}" Required="True" LabelCode="DATEREMOVAL" />

				<SelectionList Name="SelectedRemovalEmployee" Value="${SelectedRemovalEmployee}" OutputProperty="${SelectedRemovalEmployee}" ColumnName="EmpId" LabelCode="EMPREMOVAL" SqlWhereClause="${SqlWhereClauseEmp}" />
			</Container>
		</Dialog>

		<Transaction>
			<Assign Name="Set SoftwareInstallation.SelectedRemovalDate" Property="${SoftwareInstallation.RemovalDate}" Value="${SelectedRemovalDate}" />
			<Assign Name="Set SoftwareInstallation.SelectedRemovalEmployee" Property="${SoftwareInstallation.RemovalEmployee}" Value="${SelectedRemovalEmployee}" />
		</Transaction>

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