Anyone know the best way to join and display a description instead of a value in the CheckHed.Checksrc field?
Was looking for a source table to join to but could not find one. Maybe there is a document that shows translate values I could reference and related records?
Not sure if it’s “best way” but I personally would add a calculated field along these lines:
(case
when CheckHed.Checksrc = 1 then “AP Disbursements”
when CheckHed.Checksrc = 2 then “AP Manual”
when CheckHed.Checksrc = 3 then “AP User”
when CheckHed.Checksrc = 4 then “PR Manual”
when CheckHed.Checksrc = 4 then “PR User”
else CheckHed.Checksrc
end)
You could even name them anything that makes more sense to you and your users.
The error is because the text you copied has “Fancy Quotes” instead of "Normal Quotes".
@lgraham should have used the formatting commands, making her post:
(case
when CheckHed.Checksrc = 1 then "AP Disbursements"
when CheckHed.Checksrc = 2 then "AP Manual"
when CheckHed.Checksrc = 3 then "AP User"
when CheckHed.Checksrc = 4 then "PR Manual"
when CheckHed.Checksrc = 4 then "PR User"
else CheckHed.Checksrc
end)
What is the name of your calc field, and the type?
EDIT
Those need to be single quotes around the strings, like:
(case
when CheckHed.Checksrc = 1 then 'AP Disbursements'
when CheckHed.Checksrc = 2 then 'AP Manual'
when CheckHed.Checksrc = 3 then 'AP User'
when CheckHed.Checksrc = 4 then 'PR Manual'
when CheckHed.Checksrc = 4 then 'PR User'
else CheckHed.Checksrc
end)
case CheckHed.Checksrc
when 1 then 'AP Disbursements'
when 2 then 'AP Manual'
when 3 then 'AP User'
when 4 then 'PR'
when 5 then 'PR Manual'
when 6 then 'PR User'
else CheckHed.Checksrc
end