Skip to main content
Question

Business Rule - Multiple Lines


Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 26 replies

I have a validation business rule that ensures a warehouse code is entered when the status changes from “COMPLETED-REVIEW” to “COMPLETED”.
 

It usually works with a single line code , but when there are multiple lines, the behavior becomes inconsistent depending on the placement. Do you have an idea what could be causing this issue?

 

3 replies

STRGoedhart
Do Gooder (Customer)
Forum|alt.badge.img+5
  • Do Gooder (Customer)
  • 12 replies
  • January 20, 2025

Hey,

 

One way we've tackled this before is by creating a view that pulls in all related records and determines a validation status based on the results.

 

For example:

  • Build a SQL view with the primary source as request, and join it with non_part_usage records of EVAC PROPANE where user_def3 is null. Count the results.
  • Add this view to the request metadata.
  • Update the input parameter to check the “NPU udf3 null count”—if it’s greater than 0, trigger a validation error.

 


Forum|alt.badge.img+7
  • Author
  • Sidekick (Customer)
  • 26 replies
  • January 24, 2025
STRGoedhart wrote:

Hey,

 

One way we've tackled this before is by creating a view that pulls in all related records and determines a validation status based on the results.

 

For example:

  • Build a SQL view with the primary source as request, and join it with non_part_usage records of EVAC PROPANE where user_def3 is null. Count the results.
  • Add this view to the request metadata.
  • Update the input parameter to check the “NPU udf3 null count”—if it’s greater than 0, trigger a validation error.

 

In what section do you add it to the custom metadata?


STRGoedhart
Do Gooder (Customer)
Forum|alt.badge.img+5
  • Do Gooder (Customer)
  • 12 replies
  • January 28, 2025
qquac wrote:
STRGoedhart wrote:

Hey,

 

One way we've tackled this before is by creating a view that pulls in all related records and determines a validation status based on the results.

 

For example:

  • Build a SQL view with the primary source as request, and join it with non_part_usage records of EVAC PROPANE where user_def3 is null. Count the results.
  • Add this view to the request metadata.
  • Update the input parameter to check the “NPU udf3 null count”—if it’s greater than 0, trigger a validation error.

 

In what section do you add it to the custom metadata?

Under “Relation Def”, as a “JOIN” relation type - this allows it to be a viable input parameter source on the business rule.
 

Example:

The Join: 

 

Our business rule in relation to above join:
 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings