Solved

FSM business rule expression question

  • 18 December 2019
  • 5 replies
  • 437 views

Userlevel 1
Badge +2

I’m trying to write an expression in a business rule that checks the currently logged in user (User_log_in.person_id) against a team table.  However, the team table is not a “related table” to the one used in the rule.  Can an expression reference a table that the business rule/process is not related to?

 

 

icon

Best answer by Dhanushki Pahathkumbure 19 December 2019, 06:13

View original

5 replies

Userlevel 4
Badge +15

It is possible to use user_log_in in your expression, which then is referenced to the person record of the person presently logged in. But if you are trying to use any other table as an operand in your expression whose value maybe used, then it has to be a related table.

Userlevel 6
Badge +21

Can an expression reference a table that the business rule/process is not related to?

No you cant use. it should be related to the referenced table

Userlevel 3
Badge +8

Hi Ipsen,

 

We generally solve these types of issues by building & relating a custom view in our database.

  1. Create View to contain both key identifier of your primary table + whatever else data you need for your validation
  2. Create Metadata for View
  3. Create Metadata to Relation the view to your primary table
  4. Create business rule with validation against the view. 

 

We find that whenever the target for business rule input or validations are more than 1 relation away; views are your friend!

Hope this helps.

-Rudy

 

Userlevel 1
Badge +2

Thank you all for responding to this question.  I was able to find a way around by creating a metadata relationship to the Team table and it’s working great.  I was hoping to accomplish it using BR expressions to make it simple but I understand now that the expressions rely on related tables.

Thanks again everyone!

Userlevel 5
Badge +17

Please mark OP as answered.

Reply