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

ActionField1847

Beschrijving: Add linkAssets to an equipment for the selected processfunction. Custom: Nee

Propertiesbewerken

Property Type Accessor
Equipment Equipment Root

XMLbewerken

<Workflow Name="ActionField1847" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Add linkAssets to an equipment for the selected processfunction.</Description>
	<Properties>
		<Property	Name="Equipment"		Type="Equipment"		Accessor="Root"		Direction="In" />

		<Property	Name="EquipmentList"	Type="List[Equipment]"	Accessor="Internal" />
		<Property	Name="LinkedAsset"		Type="LinkedAsset"		Accessor="Internal" />
		<Property	Name="LinkType"			Type="LinkType"			Accessor="Internal" />
		<Property	Name="ProcessFunction"	Type="ProcessFunction"	Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Dialog Name="ProcessFunction_Dialog" TitleCode="PROCESSFUNCTION">
			<Container Border="True">
				<SelectionList Name="ProcessFunction" OutputProperty="${ProcessFunction}" ColumnName="PrfId" Required="True" SqlWhereClause="prfid not in (select LAPrfId from dba.LinkedAsset where LAEqmId = '${Equipment.Id}' and LAPrfId is not NULL) AND PrfContext IN (1,2) AND PrfRecstatus = 1" />

				<SelectionList Name="LinkType" OutputProperty="${LinkType}" ColumnName="LTId" />
			</Container>
		</Dialog>

		<Transaction>
			<GetList Name="Equipment" Type="Equipment" OutputProperty="${EquipmentList}" OrderBy="Id" OrderDirection="Ascending">
				<Filters>
					<PropertyFilter	PropertyName="ProcessFunction"	Operator="="		PropertyValue="${ProcessFunction}" />
				</Filters>
			</GetList>

			<ForEach Name="for all found equipment children Insert a record" In="${EquipmentList}" As="Child">
				<Insert Name="LinkedAsset" ObjectType="LinkedAsset" OutputProperty="${LinkedAsset}">
					<Parameter	Name="Context"			Direction="In"		Value="LinkedAssetContext.None" />
					<Parameter	Name="Status"			Direction="In"		Value="LinkedAssetStatus.None" />
					<Parameter	Name="Equipment"		Direction="In"		Value="${Equipment}" />
					<Parameter	Name="LinkedEquipment"	Direction="In"		Value="${Child}" />
					<Parameter	Name="LinkType"			Direction="In"		Value="${LinkType}" />
					<Parameter	Name="ProcessFunction"	Direction="In"		Value="${ProcessFunction}" />
				</Insert>
			</ForEach>
		</Transaction>

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