Is it possible to change the path of a URL View in a dashboard programatically?

customization

(Steven Simard) #1

I need to change the Path of the URL to open our network on the right client folder based on the project # which is a field in my dashboard and is accessible through the customization

In Customization, I see something called URLPanel1 wit a EpiGuid but I don’t know what I’m suppose to change or how I’m suppose to access this object in C# to change the property.

image

Thanks


(Brandon Anderson) #2

yeah, check this thread out. No C# necessary


(Steven Simard) #3

Thanks but I just tried:

\servername\Fichiers\Clients\ {client}
And the token has Customer_Name as the Publisher but when I refresh everything, it doesn’t work even if the folder exist on the network. Seems hard to find the problem, any way to alert/print the URL used somewhere?


(Brandon Anderson) #4

did you add the file extension? what type of file is it?

You can also build your URL in your BAQ if you want. Then you don’t have to set up the tokens. (well actually you would use only one)

Can you show a screen shot of your URL setup? (you can block out your server information)

This is what I have set up to look at PDF’s

image


(Steven Simard) #5

I pretty much puth the windows explorer in this so i want it to open a folder. It works great for my base folder but I want to dig deeper into the client folder and then the project folder later.

image


(Steven Simard) #6

I replaced the {} with [] (guess my vision isn’t perfect :slight_smile: ) and it worked !!!

Thanks a lot, it’s working really great and way easier than I thought


(Brandon Anderson) #7

I didn’t know if that would matter or not. Guess it does. Learned something new.


(Steven Simard) #8

Sorry for that, I think I replied too fast and I guess I clicked on the folder by accident. It’s not working :frowning:


(Brandon Anderson) #9

do you still have the \ at the end? I don’t think you need that.


(Steven Simard) #10

I removed it. It works when I update my URL but if I select another project in my dashboard and I refresh the page, the explorer (URL) doesn’t update


(Brandon Anderson) #11

I only have one of these looking at a folder, and I have it static like you did. The ones that I have tokens for are looking at URL’s or PDF files. Those ones change and I move from row to row in the grid that’s being published from.

What happens when you hit this refresh? (I should ask which refresh are you hitting?)


(Steven Simard) #12

I’m hitting the refresh on top and the refresh all button. If I clique on refresh IN the URL tab it just refresh the current folder

Edit: THe only way to make it work is to change the client, open the URL settings, click OK. Now it’s changing. But I don,t want to do that since I don’t have the Panel normally by deploying it :slight_smile:


(Brandon Anderson) #13

I’m about where you are now. I haven’t tried specifically what you are doing before, so I haven’t come across a solution.


(Steven Simard) #14

No problem, it would be nice to have something to make it work. If I was able to refresh the URL in customization in the script editor, it would be probably work since it does take the variable it just doesn’t recognize when to update.


(Brandon Anderson) #15

Well let me know if you figure something out. It would be good to know what it takes to do that.


(Steven Simard) #16

Finally, it’s working after deploying the report but when I open the report the first time or when the folder doesn’t exist, I get an error message saying that the folder doesn’t exist (seems like the customer name isn’t loaded at this time)

The folder is located on: path\[client]\[projectID] - [projectDescription].

Is it possible to prevent error messages from this? People don,t want to see error messages if the folder doesn’t exist on the network.