Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Passing $(PrimaryKey) in querystring variable
Last Post 03-06-2012 10:14 AM by Steve K. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Steve KUser is Offline
going with the flow
going with the flow
Posts:49
Avatar

--
12-01-2011 02:28 PM
    I have a Dynamic View on Page 1 that shows events.  I want to click on an edit button next to the event and be taken to a Dynamic Form on Page 2. 

    I have configured the Dynamic View module to use EventID as the primary key. I have configured a hidden field control on Page 2 called Event ID with the short name of DSParam1. I have configured the URL for the edit button's hyperlink as follows:

    mysite/page1.aspx?DSParam1=$(PrimaryKey)

    The problem that I am having is that instead of passing the actual primary key value such as 32, it is passing the string "$(PrimaryKey)" instead.

    Any ideas of what I might be doing wrong?

    Steve

    DV 2.2.0.22827 / 6.1.1
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    12-02-2011 01:46 AM
    Hello Steve,

    If you're trying to grab the ID and pass it to your Dynamic Form you might need to use the [dynamicforms_resultsid] or [uniquecompletionid] token through the URL.

    Remember tokens aren't rendered the same way in Dynamic Views templates as Dynamic Forms.

    Dynamic Forms tokens are like '$(Token)' but in Dynamic Views tokens that are created by columns generated are distinguished as '[token]'.

    Please let me know if you have any questions.

    THanks,

    Ryan
    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    12-02-2011 07:20 AM

    Thanks Ryan,

    I did actually figure that out late last night.

    What threw me is that nowhere in the Dynamic View module documentation (that I could find), does it tell you how to reference tokens in querystrings for a url. And if you have never used DV before, but have used DF and DR, you would assume (as I did) that you would reference tokens the same way.

    The only thing in the documentation that comes close to referencing tokens out of the templates section is on page 25 where it demonstrates using $(PrimaryKey) as the token to use in a SQL query as an example to delete a record from a table.

    This was further compounded by one of only a few threads on this subject http://www.datasprings.com/dnn-modu...ews/#22013 which states:


    "First Dynamic View:
    Embedded in the link you can pass the $(PrimaryKey) value via querystring like this:

    www.yoursite.com/yourView.ascx?DSParam1=$(PrimaryKey)"


    It was only when I was staring at the template page trying to figure out what to try next, that i realized that the tokens were structured differently here, so why not try this structure in the querystring, and it worked.

    I have to say, that I have a Love-Hate relationship with DataSprings' modules. I think that DF, DR, and DV combined make up a set of modules that no DNN site developer should be without.  With these modules I am now able to do things in DNN that I have always wanted to do. What I dislike, is the fact that it can take me hours to get something that should be very simple to work, such as this.

    Maybe I am rare, but I actually read module documentation prior to using it. If this had been clear, and or demonstrated in the documentation, it would have saved me hours of time.

    Don't get me wrong as I am not complaining, and I know that there is always a learning curve with new modules, I just wish that trying to get something as simple as this to work, did not take so long.

    Steve

    Patrick GaulUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-29-2012 06:45 PM
    Steve, you are not rare, and I could not agree with you more. These are great and powerful modules... but I am frequently at wit's end spending hours trying to figure something out (and yes reading the documentation) when a better description and a few simple examples would make life so much easier. In your case, what did you figure out? I need to pass a token value from Dynamic Forms to Views, to use in the data source query, and in the Views header. Do you have an example? Thanks, Patrick
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    03-01-2012 05:35 AM
    Hi guys... Yes the $(PrimaryKey) is only for the Actions area... Outside of the Actions area you have access to ALL fields within your query so you can pick and choose which actual column name you want to choose.

    Its important that we do something more unique in Actions because we don't have access to all field values in that link button, so we need to only utilize the primary key or a key value.

    So... I would imagine this would be...
    [uniquecompletionid]

    or
    [YourPrimaryKey]


    and not the token only used by SQL Actions.


    Based on your comments and suggestions I am tempted to just add ing $(PRimaryKey) and replace it with whatever ID you are looking for though... if this is causing a major headache it would not be a bad enhancement to add.

    Jus a couple other comments:
    We are starting a new training program that will be announced shortly and allow for direct training with us through GoToTraining for only $39.99 to $89.99 depending on the course. This should prove to very helpful as you will have direct access to not only other training videos but also our staff teaching it.

    We have been trying to setup as many demonstrations as possible (as well as blog posts etc..) but sometimes there is always a missing link


    Thanks again for your feedback


    -Chad


    -Chad
    Steve KUser is Offline
    going with the flow
    going with the flow
    Posts:49
    Avatar

    --
    03-06-2012 10:14 AM

    Patric,

    Sorry for the late reply. I am sure that Chad's response was helpful, but to further illustrate and answer your question in regards to my initial post, this is what I did.

    In my Dynamic View, I was viewing Users, and for the detail page, I was viewing the Events they signed up for. I wanted to be able to update those events in a Dynamic Form, so in the detail view template, I created a edit button with the following URL: MySiteName/MyDynamciFormName.aspx?DSParam1=[UserID]&DSParam2=[EventID]

    Of course your Dynamic Form has to be confirgured to accept these DSParams via hidden fields on the form. I also passed these paramaters to the form's initial sql databind using the following sql statement:

    SELECT FirstName, LastName, Email, OrgID, ProfID, SpecID, EVentID, DateIDs
    FROM EventUpdate_V
    WHERE UserID = $(DSParm1) AND EventID = $(DSParam2)

    I Hope that helps.

    Chad, as far as headaches go, this is not too bad if you know what you are doing, so I am not sure which would be better. Making the change as you suggested, or clarifying the procedure in the user manual. I will leave that one up to you.

    Steve

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi