Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield051
ActionField051
Beschrijving: Copy SpaceMaintenances from BuildingFloor to another BuildingFloor. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| BuildingFloor | BuildingFloor | Root |
XMLbewerken
<Workflow Name="ActionField051" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Copy SpaceMaintenances from BuildingFloor to another BuildingFloor.</Description>
<Properties>
<Property Name="BuildingFloor" Type="BuildingFloor" Accessor="Root" Direction="In" />
<Property Name="Building" Type="Building" Accessor="Internal" />
<Property Name="BuildingPart" Type="BuildingPart" Accessor="Internal" />
<Property Name="CollectBuilding" Type="Building" Accessor="Internal" />
<Property Name="CollectBuildingFloor" Type="BuildingFloor" Accessor="Internal" />
<Property Name="CollectBuildingPart" Type="BuildingPart" Accessor="Internal" />
<Property Name="CollectUseStandardMaintFreq" Type="Boolean" Accessor="Internal" />
<Property Name="DeleteElementQuestion" Type="RequestResult" Accessor="Internal" />
<Property Name="SourceSpaceMaintenances" Type="List[SpaceMaintenance]" Accessor="Internal" />
<Property Name="SpaceMaintenances" Type="List[SpaceMaintenance]" Accessor="Internal" />
<Property Name="YearPlanScenarioLineCount" Type="Int64" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Transaction>
<Assign Name="SetBuildingPart" Property="${BuildingPart}" Value="${BuildingFloor.Id.BuildingPart}" />
<Assign Name="SetBuilding" Property="${Building}" Value="${BuildingPart.Id.Building}" />
<GetList Name="GetLinkedSpaceMaintenance" Type="SpaceMaintenance" OutputProperty="${SpaceMaintenances}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="BuildingId" Operator="=" PropertyValue="${Building.Id}" />
<PropertyFilter PropertyName="BuildingPartId" Operator="=" PropertyValue="${BuildingPart.Id.Id}" />
<PropertyFilter PropertyName="BuildingFloorId" Operator="=" PropertyValue="${BuildingFloor.Id.Id}" />
<PropertyEmptyFilter PropertyName="Space" />
</CombinedFilter>
</Filters>
</GetList>
</Transaction>
<When Name="CheckIfExists » SpaceMaintenanceExists" Condition="${SpaceMaintenances} != Empty">
<Question Name="AskIfCanDelete" Type="YesNoCancel" MessageCode="1106" Default="No" OutputProperty="${DeleteElementQuestion}" />
<Choose Name="CheckIfContinue">
<When Name="Continue" Condition="${DeleteElementQuestion} == Yes">
<ForEach Name="LoopThroughMaintenances" In="${SpaceMaintenances}" As="SpaceMaintenance">
<Transaction>
<GetCount Name="GetLinkedYearPlanScenarioLines" Type="YearPlanScenarioLine" OutputProperty="${YearPlanScenarioLineCount}">
<Joins>
<Join Name="Id.YearPlanScenario" Alias="Yps" Type="InnerJoin" />
<Join Name="Yps.Id.YearPlan" Alias="Yp" Type="InnerJoin" />
</Joins>
<Filters>
<CombinedFilter FilterOperator="And">
<CombinedFilter FilterOperator="Or">
<PropertyFilter PropertyName="Yp.Building.Id" Operator="=" PropertyValue="${SpaceMaintenance.BuildingId}" />
<PropertyEmptyFilter PropertyName="Yp.Building" />
</CombinedFilter>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="Yp.Status" Operator="=" PropertyValue="YearPlanStatus.Definitive" />
<PropertyFilter PropertyName="Yps.Status" Operator="=" PropertyValue="YearPlanScenarioStatus.Definitive" />
<PropertyFilter PropertyName="SpaceMaintenanceActivity.Id.SpaceMaintenance" Operator="=" PropertyValue="${SpaceMaintenance}" />
</CombinedFilter>
</CombinedFilter>
</Filters>
</GetCount>
</Transaction>
<Validation Name="NothingMustBeFound" Condition="${YearPlanScenarioLineCount} == 0" MessageCode="1006" />
</ForEach>
</When>
<When Name="ContinueCancel" Condition="${DeleteElementQuestion} == Cancel">
<Stop Name="Stop" Mode="Abort" />
</When>
</Choose>
</When>
<Dialog Name="BuildingFromCollect" TitleCode="SELECTBUILDINGFLOOR">
<Container>
<SelectionList Name="BuildingFormula" OutputProperty="${CollectBuilding}" ColumnName="BldId" ViewfieldConfiguration="Default" Required="True" LabelCode="BUILDING" SqlWhereClause="BldContext=1" />
<SelectionList Name="BuildingPartFormula" OutputProperty="${CollectBuildingPart}" ColumnName="BldpId" ViewfieldConfiguration="Default" Required="True" LabelCode="BUILDINGPART" SqlWhereClause="BldpBldId = '${CollectBuilding.Id?}'" />
<SelectionList Name="BuildingFloorFormula" OutputProperty="${CollectBuildingFloor}" ColumnName="BldfId" ViewfieldConfiguration="Default" Required="True" LabelCode="BUILDINGFLOOR" SqlWhereClause="BldfBldId = '${CollectBuilding.Id?}' AND BldfBldpId = '${CollectBuildingPart.Id.Id?}' AND BldfId != '${BuildingFloor.Id.Id}'" />
</Container>
</Dialog>
<When Name="ContinueIfCollectBuildingFloorFilled » CollectBuildingFloorNotEmpty" Condition="${CollectBuilding} != Empty && ${CollectBuildingPart} != Empty && ${CollectBuildingFloor} != Empty">
<Transaction>
<GetList Name="GetSourceSpaceMaintenance" Type="SpaceMaintenance" OutputProperty="${SourceSpaceMaintenances}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<CombinedFilter FilterOperator="And">
<PropertyFilter PropertyName="BuildingId" Operator="=" PropertyValue="${CollectBuilding.Id}" />
<PropertyFilter PropertyName="BuildingPartId" Operator="=" PropertyValue="${CollectBuildingPart.Id.Id}" />
<PropertyFilter PropertyName="BuildingFloorId" Operator="=" PropertyValue="${CollectBuildingFloor.Id.Id}" />
<PropertyEmptyFilter PropertyName="Space" />
</CombinedFilter>
</Filters>
</GetList>
<When Name="Trash current Spacemaintenances after question" Condition="${DeleteElementQuestion} == Yes">
<ForEach Name="ForEachSpaceMaintenances" In="${SpaceMaintenances}" As="SpaceMaintenanceDeleteObject">
<TrashObject Name="TrashSpaceMaintenanceDeleteObject" DomainObject="${SpaceMaintenanceDeleteObject}" />
</ForEach>
</When>
<WorkflowCall Name="CopySpaceMaintenanceList" WorkflowName="SpaceMaintenance_CopyList">
<Parameter Name="DestinationBuildingFloor" Direction="In" Value="${BuildingFloor}" />
<Parameter Name="SpaceMaintenanceList" Direction="In" Value="${SourceSpaceMaintenances}" />
</WorkflowCall>
</Transaction>
</When>
<UserContent Name="Post" />
</Execution>
</Workflow>