--- alias: user-guide-sampling-pattern-index description: "Defines a method for configuring in-step sampling sequences and selections" --- # Sampling Pattern :lock: SamplingPattern.**Show** !!! info Sampling is a Critical Manufacturing optional module. ## Overview A Sampling Pattern is used for In-Step sampling. Essentially, it is used to set a Sampling Selection which defines which Sub-Materials must be sampled at a particular **Step** and in which sequence. In-Step Sampling can be used separately or in combination with Lot-based Sampling as provided by a Sampling Plan. A Sampling Pattern can be used as a business rule prior to Track-In, in which case it is preserved at Track-In or it can be set at Track-In, Sampling Patterns are configured at the **Step** level. At the **Step** level, it is also possible to configure whether the sampling Selection is cleared on abort or not. The next picture illustrates how In-Step Sampling works. ![Sampling Pattern Process](../../images/sampling_pattern_process.png) ## Tying Everything Together ```mermaid graph LR A1[Material] -.- Main[Sampling Pattern] --- C1[Step Sampling Pattern Context] --- A2[Step] A1 -.- C1 classDef mermaid_title color:#000, fill:#fafafa, stroke:#fafafa, stroke-width:0x, font-size:100%, font-weight:200; classDef mermaid_start color:#000, fill:#fafafa, stroke:#fafafa, color:#fafafa, stroke-width:0x, font-size:100%, visibility: hidden; classDef mermaid_businessdata color:#000, fill:#65CDE8, stroke:#65CDE8, stroke-width:0px, font-size:100%; classDef mermaid_nonbusinessdata color:#000, fill:#B7DEE8, stroke:#B7DEE8, stroke-width:0px, font-size:100%; classDef mermaid_entity color:#000, fill:#FB9F53, stroke:#FB9F53, stroke-width:0px, font-size:100%; classDef mermaid_entitylinked color:#000, fill:#FCD5B5, stroke:#FCD5B5, stroke-width:0px, font-size:100%; classDef mermaid_context color:#000, fill:#B9CDE5, stroke:#B9CDE5, stroke-width:0px, font-size:100%; classDef mermaid_optional color:#000, fill:#B7DEE8, stroke:#65CDE8, stroke-width:1px, font-size:100%, stroke-dasharray: 5 5; class Main mermaid_entity class A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14 mermaid_businessdata class L1,L2,L3,L4,L5,L6,L7 mermaid_entitylinked class C1,C2,C3,C4,C5,C6 mermaid_context class N1,N2,N3,N4,N5,N6 mermaid_nonbusinessdata click Main "../../business-data/sampling-pattern" click A1 "../../business-data/material" click A2 "../../business-data/step" click C1 "../../administration/tables/smart-tables/stepsamplingpatterncontext" ``` ## Sequence Of Steps The necessary steps for correctly using a Sampling Pattern are the following: 1. Create the Sampling Pattern. 2. Mark the desired In-Step sampling with the property In-Step Sampling set to `true` and attach the **Sampling Pattern** using the Sampling Pattern Context. {{ generate_index() }}