Hi, I've loaded my excel table and I need assistance with adding a contains and replace into my script. For example I have a description column in my excel table that contains commentary. I need to search for keywords from this column and replace it with a name.
So..for example, my 'Description' column looks like
1) Summary: Ticket Group: US_Team1 - on this date, xxx
2) Summary: Ticket Group: Asia_123Team - on this date, xxx
I need my script to search this Description column where if 'US_' exists then I need this new field to display Team 1 or if 'Asia_' exists I need this new field to display 123Team. It needs to extract keyword between US_ and - or Asia_ and -
It might not be super scalable, but you could try something like TextBetween() with nested if statements in your preceeding load. It'd require everything to follow the format you listed though, specifically in that the text you want to extract falls between the "US_" and " - " characters. But it might be a starting point, anyways!
if(WildMatch(Column2,'*Asia_*'),TextBetween(Column2,'Asia_',' - '),)) as [Team Name]
1,Summary: Ticket Group: Asia_123Team - on this date, xxx
2,Summary: Ticket Group: US_Team1 - on this date, xxx
Edit: In thinking more about this, I supposed you could do without the nested if statements that check for the country name. That seems kind of pointless I guess. If you know that there's only one _ character in the string and it always follows the country name, then you'd just do something like this: