Skip to main content
Question

Assyst form visibility expressions

  • December 5, 2022
  • 6 replies
  • 182 views

Forum|alt.badge.img

Can anyone tell me what is causing a visibility expression to be invalid when comparing two different custom fields on an Assyst form?

 

I have a form that has a leaver contact User and I want to compare it’s selected value against the line manager contact user field.  Based on the wiki, I reference fields by prefixing with $W(“<short code>”) and that works fine if I compare one of the fields against a hard coded value but if I try to compare one custom field against another then it complains that the expression is not valid.  

 

Any ideas on what I am doing wrong?

 

   

6 replies

Forum|alt.badge.img+10
  • Hero (Employee)
  • December 7, 2022

If these are lookups to the contact user table you could try:

 

$W("LINE MANAGER").shortCode = $W("LEAVER").shortCode

 

or .name if the name values should match.


Forum|alt.badge.img
  • Author
  • Do Gooder (Customer)
  • December 7, 2022

Thanks MennovH for your response.  Those options don’t work unfortunately it just complains that the expression is invalid, it seems that while the left side of the expression can be a lookup field, the right hand side can only be a hard coded value.  


Forum|alt.badge.img+10
  • Hero (Employee)
  • December 7, 2022

Are both fields single selects?

 


Forum|alt.badge.img
  • Author
  • Do Gooder (Customer)
  • December 7, 2022

Are both fields single selects?

 

Yes


Forum|alt.badge.img+10
  • Hero (Employee)
  • December 7, 2022

Okay I just tested on my local system and I get the same error.

It doesn’t like comparing two custom fields with each other.

This seems like a good candidate for a new idea for assyst.

 


Forum|alt.badge.img
  • Author
  • Do Gooder (Customer)
  • December 7, 2022

Okay I just tested on my local system and I get the same error.

It doesn’t like comparing two custom fields with each other.

This seems like a good candidate for a new idea for assyst.

 

Thanks for looking into it.  Good to know I am not doing something stupid.