Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I have few columns like status, Id, detailed_description, Comments. Based on this columns i need to define new column like NULL, ID was submitted with error, not repeated, Duplicate ID, Working as expected , Option not to fix, Rejected and Invalid_Rejected(8 values). while i am creating the condition i am not getting expected output.I am getting missing value in new column. I am giving condition below. Can any one please help me on this.
Points:
1)if status is rejected and comments is blank or Detailed_Description is blank then Null
2)if status is rejected and comments and detailed_description has some keyword we need to search with those keywords and create a values as ID was submitted with error, not repeated, Duplicate ID, Working as expected and Option not to fix.
3)if not find any keyword from above condition then we need to define another condition by using detailed_description is rejected or comments is rejected then rejected else invalid_rejected
Based on above points i have written the condition:
if(status='Rejected',
if(wildmatch(Detailed_Description,'*Id was submitted with error*','*Invalid*'),
if(wildmatch(comments,'*Id was submitted with error*','*Invalid*'),'ID was submitted with error'),
if(wildmatch(Detailed_Description,'*Cannot be created*','*Cannot Repeated*'),
if(wildmatch(comments,'*Cannot be created*','*Cannot Repeated*'),'Not repeated'),
if(wildmatch(Detailed_Description,'*Same*','*Similar*'),
if(wildmatch(comments,'*Same*','*Similar*'),'Duplicate ID'),
if(wildmatch(Detailed_Description,'*Working as expected*','*working as story*'),
if(wildmatch(comments,'*Working as expected*','*working as story*'),'Working as expected'),
if(wildmatch(Detailed_Description,'*Work around*','*accept*'),
if(wildmatch(comments,'*Work around*','*accept*'),'Option not to fix')
))))),
if(status='Rejected',
if(not(wildmatch(Detailed_Description,'*Id was submitted with error*','*Invalid*')) or
not(comments,'*Id was submitted with error*','*Invalid*')),
if(not(wildmatch(Detailed_Description,'*Cannot be created*','*Cannot Repeated*')) or
not(comments,'*Cannot be created*','*Cannot Repeated*')),
if(not(wildmatch(Detailed_Description,'*Same*','*Similar*')) or
not(wildmatch(comments,'*Same*','*Similar*')),
if(not(wildmatch(Detailed_Description,'*Working as expected*','*working as story*')) or
not(wildmatch(comments,'*Working as expected*','*working as story*')),
if(not(wildmatch(Detailed_Description,'*Work around*','*accept*')) or
not(wildmatch(comments,'*Work around*','*accept*')),
if(wildmatch(comments,'*Rejected*','*Re jct*') or wildmatch(Detailed_Description,'*Rejected*','*Re jct*'),'Rejected', 'Invalid_Rejected'
)))))
))) as Reason
Can any one help me on this above condition.Thanks in Advance
I believe you are going to need to attach a sample app on this one in order to get further help, if you can do that, I suspect someone may be able to reply and help you out at that point.
Regards,
Brett