Checklist

assert

In a checklist step you can assert any value from the metadata.

assert

In a checklist step you can assert any value from the metadata.

The metadata are in a attached 'meta.yaml' file.

Here is the content of a sample meta.yaml file:

$schema: https://paxpar.tech/schema/common.tutorial.demo_attest_exam.craftforms.attest_exam.base.craftform/1
date_examen: '2024-06-21'
date_naissance: '2000-05-28'
matiere: Mathématique
nom: MAQUET Martine
adresse: 41 avenue Diderot 07400 Le Teil
note: 16

To check if the note is greater than 12, you can use any of:

assert: meta.note > 12
assert: root.meta.note > 12
assert: pdf.attachments.meta_yaml.note.content > 12

tricks

You can use complex expressions

# simple prefix
assert: "'FA2_' in pdf.info.pdfname"
# double prefix : OK if PDF name starts with FA2_ or FA3_
assert: "('FA2_' in pdf.info.pdfname) or ('FA3_' in pdf.info.pdfname)"

# OK if PDF name don't start FA2_ and PDF name don't start FA3_
assert: "('FA2_' not in pdf.info.pdfname) and ('FA3_' not in pdf.info.pdfname)"

# OK is first 4 letters of PDF name ne sont pas dans ('FA2_', 'FA3_') 
assert: "pdf.info.pdfname[:4] not in ('FA2_', 'FA3_')"