Problem with condition when querying model

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
Greetings,

I'm having a problem with a model not querying the correct record as defined in the model conditions. The condition is that the Id is equal to the value on another model. The value on the other model is selected by the user, and is a reference picklist. Regardless of the value on the other model, the same record is always returned by the query. I checked in the JavaScript console that there is only a single record in the other model.

I was just curious if anyone else has had this problem.

Thanks.
Photo of John Freese

John Freese

  • 542 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
John,

You'll have this problem depending on your model order, and how you're preforming your queries.
Suggest instead of using a 'field from another model' condition, use a 'single specified value' condition, and in your action sequence when the user selects the value, use an 'activate and set value' action to send the value to the condition before your query.
Another option would be to keep the 'field from another model' condition and query both models in the same action.
I've had better success with the former.