Jump to content

Search the Community

Showing results for tags 'Record Edit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • 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 1 result

  1. I have a table that keeps track of the work schedule for our clients. The record contains the date that the assignment was opened, the ID assigned to the assignment, the name of the company, and product purchased. I have a report that sorts all open assignments by a concatenated field of all the above fields. The result of the HTML code looks like: 02/19/2016 - 32984 - Company Name (Product) This portion works perfectly. I have another DataPage that allows for the work schedule record to be modified. Some times the assignment is put on hold, some times the start date needs to be modified, etc. As soon as I open the DataPage that modifies the information, the Date changes from "02/19/2016" to "2/19/2016". The usual change is for an assignment to be put on hold and if I update the status, the new result of the display field is: Hold - 2/19/2016 - 32984 - Company Name (Product) If I change the Date from the calendar popup as well as the status, I get the following result: Hold - 02/20/2016 - 32984 - Company Name (Product) The problem is when sorting the report showing all assignments, the sort order is incorrect because there is no proceeding "0" in some of the dates. Here is the code pasted in the footer to create the value. <SCRIPT LANGUAGE="JavaScript"> function concatenate1() { var SchedStatus = document.getElementById("EditRecordStatus").value; var Control = document.getElementById("EditRecordID").value; var Company = document.getElementById("EditRecordCompany").value; var Company25 = Company.substring(0,25); var Date = document.getElementById("EditRecordDate_Open").value; var Product = document.getElementById("EditRecordProduct").value; var Product7 = Product.substring(0,7); if (SchedStatus == "Hold") { var DateControl = 'Hold - ' + Date + ' - ' + Control + ' - ' + Company25 + ' (' + Product7 + ')'; } else { var DateControl = Date + ' - ' + Control + ' - ' + Company25 + ' (' + Product7 + ')'; } document.getElementById("EditRecordDate_Control").value = DateControl; } document.getElementById("caspioform").onsubmit=concatenate1; </SCRIPT> What I need to know is how to get the proceeding "0" to remain in the date.
×
×
  • Create New...