I have 1 table with 3 fields:
- company_id (integer)
- category_id (integer)
- Unique_identifier (text): I want to concatenate company_id value with _ (underscore) with category_id value.
I followed the instructions here:
but with no success. I would like some light on my problem. My code in the datapage is:
<SCRIPT LANGUAGE="JavaScript">
function concatenate()
{
var cat = document.getElementById("EditRecordcategory_rel_id").value;
var company = document.getElementById("EditRecordcompany_rel_id").value;
I replaced the insertRecord for EditRecord because the above document says: Search and Report DataPage, replace the prefix "InsertRecord" with "EditRecord" in the code. but the code is not in the details page. I put the script in the footer of my "Search and Report Wizard - Configure Results Page Fields".
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.
Question
dasigrist
Hi,
I have 1 table with 3 fields:
- company_id (integer)
- category_id (integer)
- Unique_identifier (text): I want to concatenate company_id value with _ (underscore) with category_id value.
I followed the instructions here:
but with no success. I would like some light on my problem. My code in the datapage is:
<SCRIPT LANGUAGE="JavaScript">
function concatenate()
{
var cat = document.getElementById("EditRecordcategory_rel_id").value;
var company = document.getElementById("EditRecordcompany_rel_id").value;
var unique = company + "_" + cat;
document.getElementById("EditRecordUnique_Identifier").value = unique;
}
document.getElementById("caspioform").onsubmit=concatenate;
</SCRIPT>
I replaced the insertRecord for EditRecord because the above document says: Search and Report DataPage, replace the prefix "InsertRecord" with "EditRecord" in the code. but the code is not in the details page. I put the script in the footer of my "Search and Report Wizard - Configure Results Page Fields".
any help would be great.
attache there is a screenshot of the page:
thank you.
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
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.