cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
mtrensch
Level I

Open jmp file from Teams/Sharepoint on publicly used script

Opening a jmp file from Microsoft Teams/Sharepoint is simple enough if I'm the only one using the script. I just go into Teams and click "Add Shortcut to OneDrive" and then am able to map to the file as shown below.

 

dt = Open("C:\Users\{username}\OneDrive - {company}\Data\Table.jmp");

The problem I'm having is that I want this script to be usable by others in the company. I could make {username} a variable, but then it would still rely on others having the same shortcut added to their OneDrive. I've also tried copying the link to the file from Teams, but JMP isn't able to open that (e.g. https://{company}.sharepoint.com/:u:/s/{department}/Ed7cb_0X97BFtr4z-xh9mw0BBurcocxxsg91yyz9hHVUjg?e=y  ). Even if that did work, I would have to know the exact path for each file when I would very much prefer to just use folder structure naming.

 

Is there a way to open Teams/Sharepoint files that will consistently work with multiple people using the script?

2 REPLIES 2
jthi
Super User

Re: Open jmp file from Teams/Sharepoint on publicly used script

Maybe one of these from How to re-access a file on SharePoint? would work?

 

"Few older posts (open JMP's web browser, authenticate there and then open the file)

There could be also an option to authenticate using HTTP Request, but I'm not familiar how that can be done with sharepoint."

-Jarmo

Re: Open jmp file from Teams/Sharepoint on publicly used script

I have the beginnings of a JSL/HTTP Request/New OAuth2 script that uses the MS Graph API.
It doesn't access files (yet).
The biggest hurdle is registering in your company's Azure/Entra portal.
Depending on your admin rights it can be super easy/barely an inconvenience or you may have to go through some hoops.
However, once authenticated, it's fairly easy to step through OneDrive/Sharepoint with MS graph.
Most of the data is JSON (which I just think of as JSL Associative Arrays)
when you get to a file item, there's a url where you can actually retrieve the file.

I can post what I have (or email me) if you're interested.