Forums: [SOLVED] passing ASPRunner record values (in dal) to external asp - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] passing ASPRunner record values (in dal) to external asp Rate Topic: -----

#1 User is offline   tone21705 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 09-June 09

Posted 10 March 2010 - 06:24 PM

Hi,

I have a created an ASPRunner list page, and it has 8 columns. The 8th column (Action) was added by me in Design Mode and has a code snippet to generate a link for each row in the ASPRunner table that has the data from that rows record (OriginalContentOwner and FormType) and pass it to an external ASP page.

I have tried this but get an error on data():
Response.Write("<a href='http://" & Session("HostServer") & "/UO/Web/Worklists/RiskManagement/assign.asp?UOLogNumber=" & Session("UOLogNumber") & "&OriginalContentOwner=" & data("OrignalContentOwner") & "&FormType=" & data("FormType") & ">Go!</a>")


Here is an shortened example of the table:

------------------------------------
OrignalContentOwner|FormType|Action|
------------------------------------
John Smith |StartForm| Go! |
------------------------------------
Mickey Mouse |EndForm | Go! |
------------------------------------
John Smith 2 |MidForm | Go! |
------------------------------------

If they click Go! for the first row I want this URL to be passed:
http://hostserver.com/UO/Web/Worklists/RiskManagement/assign.asp?UOLogNumber=75&OriginalContentOwner=John%20Smith&FormType=StartForm

and if they click row 2 the data will change accordingly.

The only way I have been able to do this is leave the code snippet ending at
Response.Write("<a href='http://" & Session("HostServer") & "/UO/Web/Worklists/RiskManagement/assign.asp?UOLogNumber=" & Session("UOLogNumber") & "&OriginalContentOwner=")

and going into templates/vw_ControlPage_list.htm and adding
<TD>{$event vw_ControlPage_Snippet1}{$OriginalContentOwner_value}&FormType={$FormType_value}'>GO!</a></TD>


Obviously if I or anyone else ever rebuilt the project they would have to do the same, and it makes it a huge pain.

Any other way to do this? I noticed

data("OriginalContentOwner") but I got an ASP error. Maybe I need to define data() as an object of dal.something? It seems that {$OriginalContentOwner_value} is processed after the ASP, but I am unsure.

Thanks so much,

Antoni
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 8453
  • Joined: 03-February 03

Posted 11 March 2010 - 05:55 AM

Code snippet doesn't have access to underlying page data. I would suggest to add new dummy column to the SQL query and set 'View as' type of this column to 'Custom'.

select ...
field1,
field2,
0 as dummyfield
from ...

Examples of accessing data from custom code:
http://xlinesoft.com...ings_custom.htm
Best regards,
Sergey Kornilov
0

#3 User is offline   tone21705 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 09-June 09

Posted 18 March 2010 - 10:04 PM

Worked perfectly. Thanks for everything!
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users