Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5069 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

" DesktopPath: " & Get(DesktopPath) & " UserName: " & Get(UserName) & " UserAcount: " & Get(AccountName) & " HostName: " & Get(HostName)

When I use the DesktopPath function I get something like : Macintosh HD/Users/DanielPaquin/Desktop

What I am interested in getting is the information contained between /Users and /Desktop i.e: DanielPaquin

I've tried UserName and AccountName and found out those were in relation to FMP. I then used HostName which gave me the name of the MacMini server, in this case being ARWEN.

Is there a get function which would give me only DanielPaquin

In the meantime I will continue searching.

Best regards!

Daniel

Posted

It would be helpful to know why you need the name of this directory. Otherwise, this is simply a parsing question.

Posted

The data files used by the FMP DBMS I am currently creating is always located in the UserLogon name directory. At that location, there also a list of folders which are used by other MAC system component. Then if a user logon onto the system under MrX, all required files will then be located under ../Users/MrX/...

I am trying to see if there is a quick way to point to that folder without parsing.

At this moment, I am using this parsing function which I need to clean up since FMP is giving me an error.

Best regards!

Daniel

Let ( [

StartPos = Position ( Get(DesktopPath) ; "/Users/" ; 1 ; 1 )+7;

Len = Position ( Get(DesktopPath) ; "/Desktop" ; 1 ; 1 ) - StartPos;

UserHost = Middle (get(DesktopPath); StartPos;Len)

] );

Posted

Try =

Let ( [

path = Get ( DesktopPath ) ;

start = Position ( path ; "/Users/" ; 1 ; 1 ) +7 ;

end = Position ( path ; "/" ; start ; 1 )

] ;

Middle ( path ; start ; end - start )

)

Posted

Hmm. I'm not following your setup. What do you mean by the data files are in the user's directory?

This topic is 5069 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.