Skip to main content
January 15, 2025
Solved

Query question

  • January 15, 2025
  • 1 reply
  • 0 views

I have a table with a legacy identifier and a current identifier.

I want to query the table, by first check the current identifier for a match, then fall back to the legacy one.

Is there a good way to do this with Appian queries?

I cant really do what i want with or and and logical expressions.

Best answer by mikes0011

I'd expect you could do this in an expression rule wrapping your query entity - use OR filtering to find items that match either identifier, then use conditional logic (based on the result of the initial query) to return the result using the current identifier, if there was one, otherwise returning the legacy result, if there was one.  Shouldn't even require a double-query (unless you're strictly required to ONLY query on the legacy ID if the new ID has zero matches).

1 reply

mikes0011
mikes0011Answer
Brainy
January 15, 2025

I'd expect you could do this in an expression rule wrapping your query entity - use OR filtering to find items that match either identifier, then use conditional logic (based on the result of the initial query) to return the result using the current identifier, if there was one, otherwise returning the legacy result, if there was one.  Shouldn't even require a double-query (unless you're strictly required to ONLY query on the legacy ID if the new ID has zero matches).