cancel
Showing results for 
Search instead for 
Did you mean: 

PC: Business rule BRF syntax condition question

Former Member
0 Kudos

I am in the middle of creating the Business Rule QM_EPR_01C1_01_Q which is about monitoring materials by expiration date.

What I would like to achieve is to be able to filter on products that are or will be expired in a few months time (field shelf life expiration date). BRF sounds like the logical solution

Any idea what syntax formula I need to setup to fulfil this requirement?

See attachment (syntax formula)

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Anyone?

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Paul,

That document sounds to me like a potential SCN blog post, to which you could post a link, for the benefit of all of us. Just a thought.

Regards,

Gretchen

Former Member
0 Kudos

Thanks Paul for your information.

Does anyone know how to a get negative result for a date comparison between the current date and the expiration date? When I enter the formula

DT_DURATION_DIFF_INT_DAYS ( DT_GET_CURRENT_DATE ( ) , BR50012301_00000006 )

in which BR50012301_00000006 stands for Shelf Life expiration date I will always get a positive result, no matter if the product has expired or not.

For example if today it would be 15th March and the expire date of product A is 30 March and product B was 10 March (expired) I will get the the result of 15 days for product A and 5 days for product B. Both positive values. However I would like to retrieve a negative number for product B in order to set a proper deficiency filter. See attachment

Thanks in advance

Former Member
0 Kudos

Ok, Paul pointed me to this thread. I didn't know the definitive answer, but I knew someone who did!

Felipe Hernandez Plazas, the real BRF+ expert, suggests using an IF statement along with the expression you tried. Please look at the screenshot he sent me, attached.

Former Member
0 Kudos

Atul, the BRF+ expert is correct

Used the formula provided and the results are shown as expected

Thanks Paul, Atul and Felipe.

Former Member
0 Kudos

Hi T. de Jong,

Could you please explain us as to where did you create the condition that is required, is it in the "Conditions and Calculations" tab of the business rule or "BRF plus workbench" and pulled it to the business rule in process control?


Regards,

Ramakrishna Chaitanya

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Ramakrishna,

The rule is created in the BRF+ workbench

TJ

Former Member
0 Kudos

Hi TJ,

Thanks for the response.

Could you please explain, how to link the rule that is created in BRF+ workbench and the business rule that is created in PC.

Regards,

Ramakrishna Chaitanya

Former Member
0 Kudos

First you need to create a placeholder condition in the business rule, in the BRF+ workbench you can modify this condition with the correct formula and test it with the ad-hoc query functionality of the business rule.

Former Member
0 Kudos

Could you explain the process of creation of placeholder condition or if you have any document relating to the same can you share that

Former Member
0 Kudos

please check your e-mail

naveen_alluru
Active Participant
0 Kudos

Hello T. de jong / Ramakrishna

Please share the placeholder condition document/process. Thank you

Former Member
0 Kudos

Naveen, you still need it?

naveen_alluru
Active Participant
0 Kudos

Yes, please.

Former Member
0 Kudos

please drop me a message with your e-mail address

naveen_alluru
Active Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Answers (0)