Jump to content

Search the Community

Showing results for tags 'combine'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 5 results

  1. Hi there, I need to create a trigger that sums different column values per user. I have multiple users on a table (below) and would like to on another table insert sum the number values of each a_user per column and insert it into another table as a combined history. ie user1: 106 | 60 | 73 user3: 96 | 45 | 71
  2. I'm trying to figure out how to use a concatenate function that works in a submission form for a tabular inline insert. I believe Ajax has to be disabled for this (I did that). I have the below in a custom.js file accessible by the page the datapage is hosted in: //concate for the simple combination field function f_secondcombination(part1, part2, comb){ $("[name='"+comb+"']").val($("[name='"+part1+"']").val()+"_"+$("[name='"+part2+"']").val()); } In the datapage itself I'm using, in the header: <div id="cb_sup"> In the footer of the datapage: </div> <script> $("#cb_sup form”).click(function(){ f_secondcombination('InsertEditRecordCompanyID', 'InsertEditRecordArea', 'InsertEditRecordCompanyID_Area'); }); $(document).ready(function(){ var v_errmes = "This Area already exists for this Company. Please provide a different one."; f_modify_err_message("cb_value_present", "cb_not_valid_info",v_errmes); }); </script> When the user adds a new record (in inline insert) it should combine the 'CompanyID' field with the 'Area' field and put that in 'CompanyID_Area' (which will be a unique field in the table so duplicates can be checked). I can't get this to work- if someone can please help troubleshoot this I'd very much appreciate it.
  3. I found this script in the "help function". To be used in a "submission form". It says that I can replace INSERTRECORD With EDITRECORD if a want to to use the script in a details page of a Search an Report Datapage. I have a problem With that. Is there something more I have to do? <script Language="JavaScript"> function concatenate() { var position1 = document.getElementById("InsertRecordPosition1").value var position2 = document.getElementById("InsertRecordPosition2").value var allpositions = position1 + position2; document.getElementById("InsertRecordAllPositions").value=allpositions; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  4. I'm trying to figure out how to use a concatenate function that works in a submission form for a tabular inline insert. I believe Ajax has to be disabled for this (I did that). I have the below in a custom.js file accessible by the page the datapage is hosted in: //concate for the simple combination field function f_secondcombination(part1, part2, comb){ $("[name='"+comb+"']").val($("[name='"+part1+"']").val()+"_"+$("[name='"+part2+"']").val()); } In the datapage itself I'm using, in the header: <div id="cb_sup"> In the footer of the datapage: </div> <script> $("#cb_sup form”).click(function(){ f_secondcombination('InsertEditRecordCompanyID', 'InsertEditRecordArea', 'InsertEditRecordCompanyID_Area'); }); $(document).ready(function(){ var v_errmes = "This Area already exists for this Company. Please provide a different one."; f_modify_err_message("cb_value_present", "cb_not_valid_info",v_errmes); }); </script> The other solution I'm trying is having only this (so it's not referencing the custom.js file) in the footer: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var CompanyID = document.getElementById("InsertEditRecordCompanyID").value; var Area = document.getElementById("InsertEditRecordArea").value; var CompanyID_Area = CompanyID + Area; document.getElementById("InsertEditRecordCompanyID_Area").value = CompanyID_Area; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Neither of these is working: When the user adds a new record (in inline insert) it should combine the 'CompanyID' field with the 'Area' field and put that in 'CompanyID_Area' (which will be a unique field in the table so duplicates can be checked). If someone can please help troubleshoot this I'd very much appreciate it.
  5. Good afternoon, I am attempting to use the Javascript posted in the solutions to combine fields. In my case I have three fields I am looking to combine. Employee_First_Name, Employee_Last_Name, and Employee_ID. The ideal formatting of this would be Lastname, Firstname - EmployeeID (For Example Smith, John - 111111) Here is the script I have that is not currently combining the fields let alone getting into the details of formatting. This is being deployed in a submission datapage. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var Employee_First_Name = document.getElementById("InsertRecordEmployee_First_Name").value; var Employee_Last_Name = document.getElementById("InsertRecordEmployee_Last_Name").value; var Employee_ID = document.getElementById("InsertRecordEmployee_ID").value; var Employee_Selector = Employee_Last_Name + Employee_First_Name + Employee_ID; document.getElementById("InsertRecordEmployee_Selector").value = Employee_Selector; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Thank you for your time!
×
×
  • Create New...