March 6, 201114 yr " 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
March 6, 201114 yr It would be helpful to know why you need the name of this directory. Otherwise, this is simply a parsing question.
March 6, 201114 yr Author 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) ] );
March 6, 201114 yr Try = Let ( [ path = Get ( DesktopPath ) ; start = Position ( path ; "/Users/" ; 1 ; 1 ) +7 ; end = Position ( path ; "/" ; start ; 1 ) ] ; Middle ( path ; start ; end - start ) )
March 6, 201114 yr Hmm. I'm not following your setup. What do you mean by the data files are in the user's directory?
Create an account or sign in to comment