colonelblue
asked on
Is there a way to dynamically create a direct link to the first item on a filtered list?
I have a list filtered by "date added". Currently I have a link on a nav bar that goes to that list where from there one can access the latest document added. Is there a way to have a link that automatically goes to the latest added document without having to first go to the list and then clicking on the latest?
Thank you in advance.
Thank you in advance.
ASKER
Hello and thank you. I am not sure how you mean. Create an application page ?> How does it dynamically create? Any chance of an example.
Lets say I have 3 documents in a list:
Apple1.pdf Date added 10/30/11
Apple2.pdf Date added 11/2/11
Banana3.pdf Date added 11/1/11
It is filtered by lasted date added: That would make the document Apple2.pdf the latet.
I would like a dynamiic link to the lastest added link on the above list.
How do I do that?
Thank you in advance.
Lets say I have 3 documents in a list:
Apple1.pdf Date added 10/30/11
Apple2.pdf Date added 11/2/11
Banana3.pdf Date added 11/1/11
It is filtered by lasted date added: That would make the document Apple2.pdf the latet.
I would like a dynamiic link to the lastest added link on the above list.
How do I do that?
Thank you in advance.
Hi!
The idea is to create url dynamically in server code and then redirect user to created url.
Your question seemed interesting to me and I wrote a small article on this in my blog. So for details please see http://www.spsamples.com/2011/11/creating-direct-link-to-lastest.html. There you can aslo find solution package and source code. If you need futher assistance on this let me know!
The idea is to create url dynamically in server code and then redirect user to created url.
Your question seemed interesting to me and I wrote a small article on this in my blog. So for details please see http://www.spsamples.com/2011/11/creating-direct-link-to-lastest.html. There you can aslo find solution package and source code. If you need futher assistance on this let me know!
ASKER
This looks fantastic!
I will look at it now and post my results.
YOU are a genius!
Thank you.
I will look at it now and post my results.
YOU are a genius!
Thank you.
ASKER
Hello Ivan I tried to install the wsp using
stsadm.exe" -o addsolution -filename c:\SPSamples.RedirectionPa ge.wsp
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
\stsadm.exe" -o addsolution -filename c:\SPSamples.RedirectionPa ge.wsp
I got this error.
Please help.
Solution manifest for solution '38e85f30-b2e3-491f-a09a-0 4053d6c645 a' failed val
idation, file manifest.xml, line 2, character 110: The 'SharePointProductVersion
' attribute is not declared.
c:\SPSamples.RedirectionPa ge.wsp: The Solution installation failed.
stsadm.exe" -o addsolution -filename c:\SPSamples.RedirectionPa
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
\stsadm.exe" -o addsolution -filename c:\SPSamples.RedirectionPa
I got this error.
Please help.
Solution manifest for solution '38e85f30-b2e3-491f-a09a-0
idation, file manifest.xml, line 2, character 110: The 'SharePointProductVersion
' attribute is not declared.
c:\SPSamples.RedirectionPa
Do you use SharePoint 2007? The package is for SharePoint 2010, if you use SharePoint 2007, I can provide package for that too.
ASKER
My apologies , yes it is SharePoint 2007.
Package for 2007 here: https://ivanvagunin.opendrive.com/files?50271026_D0KXs
ASKER
Hello Ivan, and thank you. I see that in the dropdown that shows up , lists and some libraries show up. Curious however what if it is document libraries I'd like instead of lists.
Also does this just make one redirect? What if I needed several?
Thank you again.
Also does this just make one redirect? What if I needed several?
Thank you again.
Hi! DropDown list shows entire Lists collection (which contains all Lists and Libraries) from current web - so you have to see all lists and libraries on your web (not subwebs). What do you mean by several redirects? You can't make a one link to several targets at once.
ASKER
Hello Ivan.
That is odd because I don't see all the libraries, esp the one in need. Am I doing something wrong? I do have some subsites.
What I meant for more than one is what if I had 4 different libraries that I wanted to make a dynamic link each respectively. At the moment if I use the method you kindly created, isn't that just good for one redirect using that redirect.aspx link?
Thanks again.
That is odd because I don't see all the libraries, esp the one in need. Am I doing something wrong? I do have some subsites.
What I meant for more than one is what if I had 4 different libraries that I wanted to make a dynamic link each respectively. At the moment if I use the method you kindly created, isn't that just good for one redirect using that redirect.aspx link?
Thanks again.
Hi! I see, so do you want to redirect to library on subsite? The solution now is not intended to read data from subsites. So I will update solution to read data from subsites and to have several redirect pages.
ASKER
Ivan thank you!
Welcome ) Here is updated package: https://ivanvagunin.opendrive.com/files?50444389_rhhO4. I did not tested it much, so if find any bug - let me know please.
To get redirection for different page add "p" parameter to settings page query strings.
E.g.:
/_layouts/SPSamples/Redire ctionSetti ngs.aspx?p=1 (corresponding redirection page is _layouts/SPSamples/Redirec tion.aspx? p=1)
/_layouts/SPSamples/Redire ctionSetti ngs.aspx?p=anotherkey (corresponding redirection page is _layouts/SPSamples/Redirec tion.aspx? p=anotherkey)
To get redirection for different page add "p" parameter to settings page query strings.
E.g.:
/_layouts/SPSamples/Redire
/_layouts/SPSamples/Redire
ASKER
Hello Ivan, I was out sick yesterday. I will check it out tonight and let you ASAP.
Again MY SINCERE gratitude! :)
Again MY SINCERE gratitude! :)
ASKER
Hello Ivan, I know how to install a wsp, but how do I install your newer version over the
other?
This how I install it but I do not think it's updating the older one.
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.e xe" -o addsolution -filename c:\SPSamples.RedirectionPa ge.wsp
other?
This how I install it but I do not think it's updating the older one.
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.e
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Again my apologies for my late reply.
YOU ARE JUST SIMPLY AMAZING!
Thank you so much for your genius AND generosity!
Wishing you the best!.
YOU ARE JUST SIMPLY AMAZING!
Thank you so much for your genius AND generosity!
Wishing you the best!.
If you need futher assistance on this let me know!