Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.
RESUELTAS

Replacement of a Word

MoeShow
Meteoro

I'm trying to replace a word with another word in Alteryx but I'm having difficulty doing so. 

 

For example, my vlookup isn't being picked up because it has the Accounting - Auth0 in it and I need it to have Accounting - Okta instead. How can make that happen? I just need to replace the word Auth0 with Okta so the vlookup reads it correctly. 

 

Just to add. I need everything with Accounting - Auth0 to be replaced with Accounting - Okta and anything with BT Employee Enablement - Okta to be replaced with  BT Employee Enablement - Auth0. I can't get both to change simultaneously. I have multiple accounts that need to be changed but once I input the formula it only makes Auth0 to Okta change and not the Okta to Auth0 change.   

6 RESPUESTAS 6
MoeShow
Meteoro

.

caltang
17 - Castor
17 - Castor

Simple, use a filter tool and have it CONTAINS the word Accounting as True, and the natural False will be everything else. 

From that filter, just use a formula tool - REPLACE([YourField],”Auth0”,”Okta”

 

Now, in your FALSE of your filter, you can do the same. 

REPLACE([YourField],”Okta”,”Auth0”)

 

That should do it. If you get stuck, kindly give some sample data.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
MoeShow
Meteoro
 

I attached an example. I need to keep the preceding word and dash. I only need to change anything that says Auth0 at the end to Okta and anything that says Okta to Auth0. The preceding words can always change within the workflow so I need the formula not to factor in the preceding word and dash.  

stevediaz
Meteoro

Hello

 

 

To replace "Auth0" with "Okta" and "Okta" with "Auth0" simultaneously in Alteryx, use a "Formula" tool with this expression:

 

mathematica
ReplaceAll(ReplaceAll([Accounting], "Auth0", "Okta"), "Okta", "Auth0")
 
This formula swaps the terms in your data field.
 

Here's how you can do it:

  1. Input Data: Ensure that your data is already loaded into Alteryx.

  2. Use a Formula Tool:

    • Drag and drop a "Formula" tool onto your workflow.
  3. Define a New Field:

    • In the Formula tool configuration, you will create a new field that contains the text with replacements.
  4. Use the ReplaceAll() Function:

    • To replace "Auth0" with "Okta" and vice versa, you can use a nested ReplaceAll() function.

You can aslo check this : https://community.alteryx.com/t5/Discussions/ct-p/ayx-discussions/Mulesoft Course

 

Thank you.

caltang
17 - Castor
17 - Castor

@stevediaz I’ve not seen a ReplaceAll() function before. No offense but your text looks like it was generated from ChatGPT. 

@MoeShow sorry I didn’t get back - there was a flood of comments and I just noticed the revival of this post. Have you managed to get your desired answer or are you still stuck? 

Kindly tag us with the @ function so that we get notified otherwise it gets flooded real quick.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
MoeShow
Meteoro

@caltang I was able to find a solution. ty! 

Etiquetas
Autores con mayor cantidad de soluciones