Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1797
ActionField1797
Beschrijving: Create a PmJobMaterial for an article from bill of material Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| PmJob | PmJob | Root |
| SelectionListConfiguration | String | Optional |
| SqlWhereClause | String | Optional |
XMLbewerken
<Workflow Name="ActionField1797" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Create a PmJobMaterial for an article from bill of material</Description>
<Properties>
<Property Name="PmJob" Type="PmJob" Accessor="Root" Direction="In" />
<Property Name="SelectionListConfiguration" Type="String" Accessor="Optional" Direction="In" Default="Default" />
<Property Name="SqlWhereClause" Type="String" Accessor="Optional" Direction="In" Default="EqmspEqmId = '${PmJob.Equipment.Id?}'" Comment="SqlWhereClause for EquipmentSparePartDialog dialog" />
<Property Name="EquipmentSparePart" Type="EquipmentSparePart" Accessor="Internal" />
<Property Name="PmJobMaterial" Type="PmJobMaterial" Accessor="Internal" />
<Property Name="UsedArticles" Type="List[Article]" Accessor="Internal" />
<Property Name="UsedPmJobMaterials" Type="List[PmJobMaterial]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Validation Name="PmJob has no Equipment" Condition="${PmJob.Equipment} != Empty" MessageCode="3682">
<Parameter Name="PmJob" Direction="In" Value="${PmJob}" />
</Validation>
<Transaction>
<GetList Name="Get PmJob Materials" Type="PmJobMaterial" OutputProperty="${UsedPmJobMaterials}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.PmJob" Operator="=" PropertyValue="${PmJob}" />
</Filters>
</GetList>
</Transaction>
<ForEach Name="Loop UsedPmJobMaterials" In="${UsedPmJobMaterials}" As="UsedPmJobMaterial">
<AddToList Name="Add UsedArticle" List="${UsedArticles}" Item="${UsedPmJobMaterial.Id.Article}" />
</ForEach>
<When Name="Name" Condition="${UsedArticles} != Empty && ${UsedArticles.Count} > 0">
<Assign Name="Name" Property="${SqlWhereClause}" Value="${SqlWhereClause} AND EQMSPARTID NOT IN (#foreach(${UsedArticle} in ${UsedArticles})#each'${UsedArticle.Id}'#between, #end)" />
</When>
<SystemDialog Name="SelectDomainObject EquipmentSparePart" DialogName="SelectDomainObject">
<Parameter Name="EntityName" Direction="In" Value="EquipmentSparePart" />
<Parameter Name="SelectionListConfiguration" Direction="In" Value="${SelectionListConfiguration}" />
<Parameter Name="SqlWhereClause" Direction="In" Value="${SqlWhereClause}" />
<Parameter Name="DomainObject" Direction="Out" OutputProperty="${EquipmentSparePart}" />
</SystemDialog>
<When Name="EquipmentSparePart is not empty" Condition="${EquipmentSparePart} != Empty">
<Transaction>
<Insert Name="Insert PmJobMaterial" ObjectType="PmJobMaterial" OutputProperty="${PmJobMaterial}">
<Parameter Name="Id.Article" Direction="In" Value="${EquipmentSparePart.Id.Article}" />
<Parameter Name="Id.PmJob" Direction="In" Value="${PmJob}" />
</Insert>
<WorkflowCall Name="PmJobMaterial_SetDefaults" WorkflowName="PmJobMaterial_SetDefaults">
<Parameter Name="PmJobMaterial" Direction="In" Value="${PmJobMaterial}" />
</WorkflowCall>
</Transaction>
</When>
<UserContent Name="Post" />
</Execution>
</Workflow>