Jump to content

Submission Datapage With Parameter Not Filling Table Correctly

Recommended Posts

From a search and report page I supply a link which accesses a submission page and passes parameters using string query.  The values Client and ClientID are passed to the submission page and received correctly. When I view them on the submission page they are prefilled in the forms as they appeared in the calling link.  However when I hit submit then go look at the table they show up wrong.  


If I submit this:

Orange Street, Phase I and II CSO Correction Projects, City of New Haven


I get this:

Orange Street, Phase I and II CSO Correction Projects, City of New Haven||cb||Orange Street, Phase I and II CSO Correction Projects, City of New Haven


This is only an issue it seems when the Client has a comma in their name.  


So I click this link: javascript:newPopup('http://b6.caspio.com/dp.asp?AppKey=1e433000d01e2568bfe147aeb429&InsertRecordClient=Orange Street, Phase I and II CSO Correction Projects, City of New Haven&InsertRecordClient_ID=6724');


and it fills in the fields on that data page correctly, but it does not submit them to the table the same way they are entered.  I noticed that If I manually edit the fields once they are filled then I will get this result


RandomTextIEnteredOnSubForm||cb||Orange Street, Phase I and II CSO Correction Projects, City of New Haven


It will submit what I typed, then attach the ||cb||... to the end of that.


If I delete what is in the field then hit submit, then it errors because the field is required, then I type in the correct information even with the comma it submits it correctly without adding the extra ||cb||... stuff after.


I believe what it is doing is taking the value found in the Client input box and combining it with the parameter passed in as Client then submitting that to the table.  However I feel like that is not how it should function especially since it only seems to happen when a Comma is in the Client name.


Is this an error on Caspio's part or am I just doing something wrong?

Also if the Client name happens to have & in the name then it only read the client name up to that point then skips the rest of the name and continues onto the next parameter.  Is there a way around it?  I am assuming this is an issue because & is what is use to separate different param/value pairs.


Thank You,


Link to comment
Share on other sites

After working with Caspio's support team this problem has been solved.  


The issue is believed to be caused by my naming of parameters.  It seems the parameter prefix, InsertRecord, causes some unexpected results possibly because that prefix is meant for AutoNumber fields.  So this  code:

<a href="JavaScript:newPopup('http://b6.caspio.com/dp.asp?AppKey=1e433000d01e2568bfe147aeb429&InsertRecordClient=[@field:Client]&InsertRecordClient_ID=[@field:Client_ID]');">Claim</a>

was changed to this:

<a href="JavaScript:newPopup('http://b6.caspio.com/dp.asp?AppKey=1e433000d01e2568bfe147aeb429&Client=[@field:Client]& Client_ID=[@field:Client_ID]');">Claim</a>

This change fixed the issue.  Hopefully if anyone else has this problem this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...