Need help to replace entire column matches same Invoice Number and given conditions
Hi
I need a help for below requirements (see attached file for field and other details) -
Search Desc (column B) - "Perdiem" and replace / change data (SystemData) TO (Expected_Output)
Above condition AcCode
Note: Expected_Output is not a system generated input.
I am trying following -
1. Search text "Perdiem" in a column which has same invoice number (which is a different column) and does not contain AcCode = 24 and System Data is "DayCase". If this condition satisfies, then i am expecting system data column to be replace or change as "Inpatient".
2. If a column has same invoice number and contains AcCode = 24 and System Data is "DayCase", then i am expecting system data column to be replace or change as "Outpatient".
Note : My code is changing only 1 row and not the entire column (as only 1 row having text as "Perdiem" and other rows having different comments) having the same invoice number.
//If((([AcCode] <> '24' AND [PatType] = 'Day Surgery' AND [Dept_ActivityPhy] = 'HPN Ortho Clinic') AND (WildMatch ([CodeName], 'Perdiem - Day Stay (Day care) Surgical Case - Inclusive.'))),'In Patient', [PatType])) AS [PatType] ;