Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Find last valid comma and remove strings (City/Country) after that

Parthasarathi
8 - Asteroid

Hi All,

 

I have completed the workflow design for my process with Alteryx. In that I am facing issue to identify a comma at last of a string. I have tried with Regex and String manipulation, but still facing issues with that. Could you please check below scenarios and help me with a solution for this issue.

 

Input

OutputComments
Counterparty Name, City, CountryCounterparty NameI know it is not possible to identify the city name and country name using Alteryx, so here the expected output is Counterparty Name, City
New A.B., Counterparty Name, City, CountryNew A.B., Counterparty NameI know it is not possible to identify the city name and country name using Alteryx, so here the expected output is New A.B., Counterparty Name
New A.B., Counterparty Name, CountryNew A.B., Counterparty NameNo Issues, removed everything after the last comma
New A.B., Counterparty Name., CountryNew A.B., Counterparty Name.No Issues, same as above
New A.B., Counterparty Name., Country,New A.B., Counterparty Name.
 

Facing issue since we have a comma at end of this name 

 

2 REPLIES 2

Hi,

 

Is it possible to share a copy of your workflow? Are you wanting to remove all City and Country info from your data?

 

Also, what comes to mind is you could use the formula trimright([Input],",") to remove all commas at the end of your string. 

 

 

MichelleMitchellLutz_0-1669219645701.png

MichelleMitchellLutz_1-1669219658096.png

 

 

Parthasarathi
8 - Asteroid

Hi MichelleMitchellLutz,

 

Thank you for your reply, I will check with the steps you have mentioned. 

 

yes, I want to remove all the City and Country Names from my Input.

Labels