hougaard / Simple-Object-Designer

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

Mandatory Action #299

Closed mikeswartzentruber closed 9 months ago

mikeswartzentruber commented 9 months ago

Trying to use the mandatory action function and requiring a field to not contain "TBD", is this possible with SOD? I can say <> 'TBD', but if the value is TBD - CHECK it allows it.

User1866f6d5 commented 9 months ago

what about <>'TBD*'

mikeswartzentruber commented 9 months ago

Tried that and <>’TBD’ and it let anything go through except if I typed in TBD

Mike Swartzentruber​​​​ Financial Controller 330.516.1152 16875 Jericho Rd. Dalton, Ohio @.***,-81.6876485,17z/data=!3m1!4b1!4m6!3m5!1s0x88372353bace04e5:0x7080b456232a38f4!8m2!3d40.733122!4d-81.6876485!16s%2Fg%2F11bw4ncf8n> Flextur.comhttp://www.flextur.com/


The information contained in this e-mail message is confidential and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify Flextur by telephone (877.435.3988), and destroy the original message. Thank you.

hougaard commented 9 months ago

Try:

strpos(Rec.YourField,'TBD') = 0

mikeswartzentruber commented 9 months ago

Thanks Erik,

Playing with that code if i compare to an integer/decimal field it doesn't give me a Type Mismatch error. Now it gives me a "Unknown Decimal/Integer Operator" error, no matter what operator i chose.

image

hougaard commented 9 months ago

Ahh.. hang on... sorry, that was bad advice, let me check something.....

hougaard commented 9 months ago

I have added proper operator for "contain" and "not contain" in version 9.0.0.351 (should be available within a few hours).

Select "Not Contain" and specify 'TBD' (remember the quotes) in the expression.

mikeswartzentruber commented 9 months ago

Thank Erik,

I see the option (awesome!) but if i publish it gives this error.

image

I'm doing this on Page 42 on the Post actions.

image

hougaard commented 9 months ago

Ahh... Code ... Crap, "contains" on works on Text fields... .I'll fix that later today....

hougaard commented 9 months ago

Version 9.0.0.353 is on it's way to appsource.

mikeswartzentruber commented 9 months ago

That worked just fine, thank you!