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

ActionField580

Beschrijving: Create a BuildingFloor for Building. Custom: Nee

Propertiesbewerken

Property Type Accessor
Building Building Root

XMLbewerken

<Workflow Name="ActionField580" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Create a BuildingFloor for Building.</Description>
	<Properties>
		<Property	Name="Building"				Type="Building"			Accessor="Root"		Direction="In" />

		<Property	Name="BuildingFloor"		Type="BuildingFloor"	Accessor="Internal" />
		<Property	Name="BuildingFloorCount"	Type="Int64"			Accessor="Internal" />
		<Property	Name="BuildingFloorId"		Type="UltimoString"		Accessor="Internal" />
		<Property	Name="BuildingPart"			Type="BuildingPart"		Accessor="Internal" />
		<Property	Name="FieldWidth"			Type="Int32"			Accessor="Internal"						Default="0" />
		<Property	Name="UseAutoKey"			Type="Boolean"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Transaction>
			<Command Name="HasAutoKey" CommandName="HasAutoKey">
				<Parameter	Name="EntityName"	Direction="In"		Value="BuildingFloor" />
				<Parameter	Name="HasAutoKey"	Direction="Out"								OutputProperty="${UseAutoKey}" />
			</Command>
		</Transaction>

		<When Name="UseAutoKeyIsFalse" Condition="${UseAutoKey} == False">
			<Command Name="GetFieldWidth" CommandName="GetFieldWidth" Comment="GetFieldWidth">
				<Parameter	Name="FieldName"	Direction="In"		Value="BldfId" />
				<Parameter	Name="FieldWidth"	Direction="Out"						OutputProperty="${FieldWidth}" />
			</Command>

			<Dialog Name="Get BuildingFloorId" TitleCode="SELECTBUILDINGFLOOR">
				<Container>
					<Text Name="NewBuildingFloorId" OutputProperty="${BuildingFloorId}" Required="True" LabelCode="CODEBLDFLOOR" MaxLength="${FieldWidth}" />
				</Container>
			</Dialog>
		</When>

		<Transaction>
			<SingleItemValidation Name="Get BuildingPart" List="${Building.BuildingParts}" OutputProperty="${BuildingPart}" MessageCode="1404" AllowEmpty="True">
				<Parameter	Name="Building"	Direction="In"		Value="${Building}" />
			</SingleItemValidation>

			<When Name="When no BuildingPart" Condition="${BuildingPart} == Empty">
				<Insert Name="Create BuildingPart" ObjectType="BuildingPart" OutputProperty="${BuildingPart}">
					<Parameter	Name="Id.Building"	Direction="In"		Value="${Building}" />
					<Parameter	Name="Description"	Direction="In"		Value="${Building.Description}" />
				</Insert>
			</When>

			<GetCount Name="Get BuildingFloor Count" Type="BuildingFloor" OutputProperty="${BuildingFloorCount}">
				<Filters>
					<PropertyFilter	PropertyName="Id.BuildingPart"	Operator="="		PropertyValue="${BuildingPart}" />
					<PropertyFilter	PropertyName="Id.Id"			Operator="="		PropertyValue="${BuildingFloorId}" />
				</Filters>
			</GetCount>

			<Validation Name="Check For BuildingFloor" Condition="${BuildingFloorCount} == 0" MessageCode="0839">
				<Parameter	Name="BuildingFloorId"	Direction="In"		Value="${BuildingFloorId}" />
			</Validation>

			<Insert Name="Create BuildingFloor" ObjectType="BuildingFloor" OutputProperty="${BuildingFloor}">
				<Parameter	Name="Id.BuildingPart"	Direction="In"		Value="${BuildingPart}" />
				<Parameter	Name="Id.Id"			Direction="In"		Value="${BuildingFloorId}" />
				<Parameter	Name="Context"			Direction="In"		Value="BuildingFloorContext.BuildingFloor" />
			</Insert>
		</Transaction>

		<UserContent Name="Post" />

		<View Name="OpenScreen" ViewName="DataEntryScreen">
			<Parameter	Name="DomainObject"			Direction="In"		Value="${BuildingFloor}" />
			<Parameter	Name="FocusEditableField"	Direction="In"		Value="=${BuildingFloor.Description} == Empty" />
		</View>
	</Execution>
</Workflow>