condition quandary

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Will someone help me figure out how to write conditions for this case?

I have a model (ModelA) with a lookup field called Staff__c.
I have a model (SelectedStaff) which will either be empty (if no staff is selected) or have one row.

I want ModelA to return records where Staff__c=null when the SelectedStaff model is empty, and Staff__c=(SelectedStaff)(Id) when it's not empty.

I'm struggling to write conditions to do that. Help?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 1 year ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
GTM?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
If that means "got a minute?" then yes.
Otherwise, I have no idea.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
lol.... gotomeeting
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
hahaha, ok.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Ah.

I'm just going to use Staff__c = "" filterable default on for ModelA, and run a model actions on query of the SelectedStaff model to set the value and query ModelA. The only downside here is that I can't have skuid 'remember' the selected staff... it has to start off empty.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
All set then?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
yep! thanks.