Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My raw data sometimes has a final ';' and sometimes does not. If it does not, I would like to concat it to the end of the value so I can then run the rest of the code but I can't get the first line syntax correct :
if( Not FindOneOf(right([EST_NON_PROD_BUILD_HRS]),1), ';'),concat([EST_NON_PROD_BUILD_HRS],';'),
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'ClinDoc:' , ';' ) )) as SUB_BUILD_NP_EST_CLINDOC,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Mpage:' , ';' ) )) as SUB_BUILD_NP_EST_MPAGE,
num(trim( TextBetween([EST_NON_PROD_BUILD_HRS], 'Rules:' , ';' ) )) as SUB_BUILD_NP_EST_RULES,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'CPOE:' , ';' ) )) as SUB_BUILD_NP_EST_CPOE,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'CCL:' , ';' ) )) as SUB_BUILD_NP_EST_CCL,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Charges:' , ';' )) ) as SUB_BUILD_NP_EST_CHARGES,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'HIM:' , ';' ) )) as SUB_BUILD_NP_EST_HIM,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Lab:' , ';' )) ) as SUB_BUILD_NP_EST_LAB,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'CMpage:' , ';' )) ) as SUB_BUILD_NP_EST_CMPAGE,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Pharm:' , ';' ) )) as SUB_BUILD_NP_EST_PHARM,
num(trim( TextBetween([EST_NON_PROD_BUILD_HRS], 'ProvDoc:' , ';' )) ) as SUB_BUILD_NP_EST_PROVDOC,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Rad:' , ';' )) ) as SUB_BUILD_NP_EST_RAD,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Surgery:' , ';' )) ) as SUB_BUILD_NP_EST_SURGERY,
num(trim( TextBetween( [EST_NON_PROD_BUILD_HRS], 'Core:' , ';' )) ) as SUB_BUILD_NP_EST_CORE,
So if it is missing at last position, you want to add it?
That’s how you can do that:
if( wildmatch(right([EST_NON_PROD_BUILD_HRS],1), ';'),[EST_NON_PROD_BUILD_HRS],[EST_NON_PROD_BUILD_HRS]&';') as DesiredResult,
...
Hi,
Try this:
if( wildmatch(right([EST_NON_PROD_BUILD_HRS],1), ';'),[EST_NON_PROD_BUILD_HRS],'Last char is not ;')as DesiredResult,
...
This will check if the last char is ; and give you the full field if it is. Otherwise it will populate 'Last char is not ;'
Thanks but I need to concat the last character as a ';' if it's not there for the rest of the code to work.
So if it is missing at last position, you want to add it?
That’s how you can do that:
if( wildmatch(right([EST_NON_PROD_BUILD_HRS],1), ';'),[EST_NON_PROD_BUILD_HRS],[EST_NON_PROD_BUILD_HRS]&';') as DesiredResult,
...