Alteryx Designer Desktop Discussions

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

File Browse and Action Tool to update file path but force sheet name

KyleF
7 - Meteor

I am creating an app where I want the user to be able to use the file browse to select a file path, but then force the sheet name that is input regardless of their selection. I believe I've seen it done with update value with formula, but I don't remember the regex formula to replace the current things left of | with the path data left of |

5 REPLIES 5
KSowers
Alteryx
Alteryx

Hey Kyle,

Give this a shot and let me know if it works!

ChrisTX
15 - Aurora

If you want to avoid RegEx, you can use functions like FileGetDir,  FileGetFileName, FileGetExt to separate the folder, file name, and extension.

 

And a Text to Columns tool, using | as the delimiter to get the Sheet name

 

Then rebuild the full path you want from the existing fields.

 

Here's a list of all functions: Functions | Alteryx Help

 

ChrisTX_0-1671479302362.png

 

 

Chris

 

KyleF
7 - Meteor

Would you then use dynamic input to pull the actual data?

Felipe_Ribeir0
16 - Nebula

Hi @KyleF 

 

You can use this formula inside your action tool, just replace the Sheet1 by the Sheetname that you want to always be imported

 

REGEX_Replace([#1], '(?<=\|\|\|)(.*?)$', 'Sheet1')

 

sheetselect.gif

ChrisTX
15 - Aurora

Without RegEx, yes use Dynamic Input after you have your new full path.

 

Chris

Labels