This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Property Calculator: Error Case if two actors are the same

Good afternoon,

I think this is a fairly straight forward one but I haven't been successful to execute it, so far.

So in one of our Requests, a Requestor can specify the main "Traveler". They must also specify the "Line Manager" who will approve the Travel Request.

Both properties are based on the organizations employees.

I want to prevent that the Requestor is even able to create the Request IF the "Traveler" and the "Line Manager" are the same employee.

I guess I do this from the Property Calculator "Error Case".

Given this, I specified that a error is generated if "{Traveler} = {Line Manager}" (see screen capture).

However, the tests I am running are still allowing me to modify and save the document when "Traveler" and "Line Manager" are the same, so the error case is not working like I intended.

Can someone kindly point out the solution?

Many thanks!!

Patrick.

Parents
  • Hi,

    If both lookups are single select, this should be quite straight forward to implement. your current solution is comparing names of employee objects. String values need always be inside ('), which seems to be missing. So to make it work you need to compare 'Jack'='Jack'.

    Instead of comparing names, I suggest to use internal ID:s. They are always unique and ' -characters are not needed (because they are numbers). So please try to type advanced conditions like following:

    {Line Manager.InternalID()}={Traveler.InternalID()}

  • Hi Juuso,

    That worked perfectly - thanks!
    Thanks for the explanation too, good to know for next time! Grin

    Patrick.

Reply Children
No Data