Preloading and constraint

Welcome to the community, @winnie1993!

Regarding your queries:

(1) the personnel number must exist in the external file otherwise we return an error message

You should be able to achieve this by following this post discussed previously:

  1. the personnel number must be preloaded once and only once when entering otherwise an error message the personnel number is already preloaded

And you should be able to avhice this by following this post discussed previously: