Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have data that I am separating into two other columns which I got working:
So I take Failure Mode and break it down into WorkOrder and Reason by adding this to the script:
[Failure Mode] AS [Failure Mode],
subfield([Failure Mode],':',1) AS WorkOrder,
subfield([Failure Mode],':',-1) AS Reason,
But for WorkOrder I only want it to show the WorkOrder number if the failure mode has one. How can I do that?
Thank you!
Not sure if the Reason will ever have numbers... because if it does... then you can still see numbers from Reason show up for WorkOrder... may be try this
KeepChar(If(Index([Failure Mode], ':') > 0, Subfield([Failure Mode],':',1)), '0123456789') as WorkOrder,
Try this
If(Index([Failure Mode], ':') > 0, Subfield([Failure Mode],':',1)) AS WorkOrder,
Hi,
try this:
KeepChar(subfield([Failure Mode],':',1),'123456789') AS WorkOrder,
Hi,
thank you this worked perfectly, I just added a 0 to the '123456789'.
Thanks!!!
Sunny,
This also worked but I used the other one so it removes the "WO#" for the text also.
THANK YOU!!
Not sure if the Reason will ever have numbers... because if it does... then you can still see numbers from Reason show up for WorkOrder... may be try this
KeepChar(If(Index([Failure Mode], ':') > 0, Subfield([Failure Mode],':',1)), '0123456789') as WorkOrder,
You're welcome ! you're just wrong on the correct answer
Oh I see what you are saying. Ok I tried that and it works but randomly sometimes the reason it's showing:
Or it does this:
Seems strange since the main failure mode doesn't have those numbers?!
We only proposed solution for WorkOrder column... did you make changes to Reason also?
For Reason, I would just try this
SubField(':' & [Failure Mode], ':', -1) as Reason,