View Full Version : Passing record values from DSP recordlist to wM services
bharu2183
04-05-2007, 14:21
HI,
I have a requirement in which I have to get records from a table based on conditions to display on DSP page and when user clicks on a one of the rows returned he can edit the data for the particular row.
Say if the table has four columns
DeptNo, Name, Staffs, Budget - I have to display NAME, STAFFS BUDGET for the user corresponding to the Dept No he enters , which I have done. The next part is if he clicks on one of the rows returned he should be able to edit the values of the row.
I am having hyperlink for each row returned to do this, but how can i pass all the column values corresponding to THAT particular row user has clicked to the IS update service. When I am using %loop% I dont have an index for the variables in there. How can I accomplish this?
Thanks,
Bharathi
saurabhm
04-05-2007, 14:28
are you looking for the $index option to get the current index within that loop?
mcarlson
04-05-2007, 14:32
You can certainly build a web-based application using DSP's to query and update database rows. But why would you do that in Integration Server rather than a more traditional web-development toolset. Even Portal would be a better choice than IS for web user interfaces.
Mark
bharu2183
04-05-2007, 14:34
Saurabh,
Can you please elaborate on the $index you mentioned, If its the loop idex then it is what I am looking for.
Thanks,
Bharathi
saurabhm
04-05-2007, 14:39
You can look into the developers guide for DSP's and templates for more information on $index
Or just try it out with %value $index%
bharu2183
04-05-2007, 14:41
Mark,
You are right, we had explained the clients it is better to use Portal as we use with many other projects and IS DSP's are better for our IS Administrative purposes.
The requirement being a look up and smaller one they have decided to have the table in IS config schema and dsp pages to manipulate the look up data.
Thanks,
Bharathi
bharu2183
04-06-2007, 18:14
Thank Saurabh, that solved a part of it.
HI,
How can we pass special characters to a DSP?
For e.g
<!DOCTYPE HTML PUBLIC >
<HTML><HEAD><META HTTP-EQUIV="Content-Type"
VALUE="text/html;charset=UTF-8"><TITLE></TITLE></HEAD>
<BODY BGCOLOR="#FFFFCC">
%invoke Test:getDetails%
<TR>
<TD>Area</TD>
<TD>Route</TD>
</TR>
%loop Services%
<TR>
<script>writeTD("rowdata-l");</script>%value Area%</TD>
<script>writeTD("rowdata-l");</script>%value Route%</TD>
<script>writeTD("rowdata-l");</script><A HREF="/Test/updateDetails.dsp
?action=update&Area=%value Area($index)% &Route=%value Route($index)">Update</A></TD>
</TR>
%endloop%
%endinvoke%
</BODY>
</HTML>
The value gets passed in the URl file but when I display them in the updateDetails it is
not showing correctly. If I am pssing Bayer & Bayer it is showing only Bayer in the test box.
Heres the update page I use.
<!DOCTYPE HTML PUBLIC >
<HTML><HEAD><META HTTP-EQUIV="Content-Type"
VALUE="text/html;charset=UTF-8"><TITLE></TITLE></HEAD>
<BODY BGCOLOR="#FFFFCC">
<H1></H1>
<HR>
<FORM ACTION="/Test/updateDetails.dsp" METHOD="GET">
<P>Area<INPUT TYPE="TEXT" NAME="Area" VALUE=%value Area%><BR>
Route<INPUT TYPE="TEXT" NAME="Route" VALUE=%value Route%></p>
<INPUT TYPE="SUBMIT" NAME = "DELETE" VALUE="DELETE">
</FORM>
<HR>
</BODY>
</HTML>
I tried passing in Hidden inputs
<INPUT TYPE="HIDDEN" NAME="Area" VALUE="%value Area($index)%"> its giving empty values.
Any alternatives please.
Thanks
Bharathi
saurabhm
04-09-2007, 10:44
How can we pass special characters to a DSP?
...
The value gets passed in the URl file but when I display them in the updateDetails it is
not showing correctly. If I am pssing Bayer & Bayer it is showing only Bayer in the test box.
Hint: Look at built-in services pub.string:URLDecode and pub.string:URLEncode
HTH.