Forum Discussion
jgsudderth
2 years agoNew Member
Help with Dynamic File Path without using parameters
I am importing an access database. My current M code is the following: let
Source = Access.Database(File.Contents("C:\Users\John\Company Finance Dropbox\Accounting and Finance\Access D...
- 2 years ago
jgsudderth ok, check this post to get the user name, which you can use to replace the user from the path:
parry2k
Super User
2 years agojgsudderth maybe create a parameter with the name value and replace the name with the parameter, so anytime the parameter value is changed, it will update the path.
- jgsudderth2 years agoNew Member
The problem is I don't know if it will be Jack, Jill, Jack 2, etc. I'd like to future-proof this as much as possible so pulling the current user via a file path function and then inserting that would allow me to not know EVERY username that could ever use the file. Unfortunately laptops and desktops all create new "usernames" as part of that dropbox file reference.