hougaard / Simple-Object-Designer

Issue tracking for the Simple Object Designer for Business Central
7 stars 0 forks source link

Error when setting expression for required field #267

Open otherjoel opened 11 months ago

otherjoel commented 11 months ago

I want to require values entered in a particular field to be of the form 0000-0000. I'm adding conditions to the SendApprovalRequest action on the Sales Order page.

When I set the Expression (Right side) value to '????-????' then the only allowed value is literally ????-???? — that is, actual question marks.

If I try to omit the surrounding apostrophes, then I get an error:

Error message screenshot

Here’s a screenshot of what the window looks like immediately before I get the error:

screenshot of Page Action Conditions just before error

Should it be possible for me to use SOD to require that text field values conform to a particular format?

Stretch ask: at some point, can we use regular expressions? :D (Ideally I could require each side of the hyphen to be numeric only, is that possible?)

Using SOD v. 9.0.0.317

hougaard commented 11 months ago

AL does not have a direct pattern match option, but let me think about regex (even though that's the opposite of "simple")