Jump to content

bmarineau

Members
  • Content Count

    11
  • Joined

  • Last visited

  • Days Won

    1

bmarineau last won the day on October 2 2014

bmarineau had the most liked content!

About bmarineau

  • Rank
    Member

Recent Profile Visitors

240 profile views
  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.
  2. On my DataPages that have search criteria and a view details function, the field width always displays at the default of 25 instead of any entry I put into the Field Width setting. I have it using Characters as opposed to pixels or percent. If I Preview the DataPage everything appears fine. However, when I go to the DataPage from our website, it doesn't work. This error only happens if I embed code. If I use the URL, it works as it is designed. While I can alter many of my DataPages to use the URL as opposed to Embeded code, it seems as if there may be something of a quirk here. If anyone has an explanation or solution, it would be appreciated.
  3. Hi Jan, Thanks so much. I've been looking / tweeking this on and off for a few days. Can't believe I missed something so simple. Another set of knowledgeable eyes are a wonderful thing. Bill
  4. Hi, I have an update form that contains 2 hidden fields. Depending on the changes made in the form, the value of the hidden fields needs to change. One of the fields is a dropdown what controls placement on a report. I have added the following javascript to the footer. Any changes I make to the data are saved in the table, however, the hidden fields never change. Hopefully someone can spot the error in my code. Thanks, Bill <SCRIPT LANGUAGE="JavaScript"> function concatenate1() { var Sched.Status = document.getElementById("EditRecordStatus").value; var Control = document.getElementById("EditRecordID").value; var Company = document.getElementById("EditRecordCompany").value; var Company25 = Company.substring(0,25); var Position = document.getElementById("EditRecordPosition").value; var Date = document.getElementById("EditRecordDate_Open").value; var CompanyPosition = Control + ' - ' + Company + ' (' + Position + ')'; document.getElementById("EditRecordCompany_Position").value = CompanyPosition; if (Sched.Status == "Future Credit") { var DateControl = 'FC' + Date + ' - ' + Control + ' - ' + Company25; } else { var DateControl = Date + ' - ' + Control + ' - ' + Company25; } document.getElementById("EditRecordDate_Control").value = DateControl; } document.getElementById("caspioform").onsubmit=concatenate1; </SCRIPT>
  5. Hi Jan, Yes, the fields are Text64000. For the most part they do seem to "remember" things. It seems to eliminate blank lines on occasion, which may be related to the pasting issue. If I type an apostrophe it will remain. However if I paste text containing an apostrophe (or certain other punctuation marks) it's converted into the iterations I explained above. Thanks.
  6. Hi Jan, We use English (US-English to be specific). Unfortunately, the only way that it appears I can use HTML formatting is to set the field as display only. It is currently a Text Area. The problem is it needs to be a field they can edit.
  7. We have run across a problem when pasting text into a text box on an entry or edit datapage. If you paste text that has an apostrophe (or bullet points as well) Caspio turns the punctuation mark into a black diamond with a question mark in the middle. The next time you pull up the record, all the black diamonds will be replaced with the text string "�". If you enter an apostrophe from the keyboard directly into the text box, it stays as it should. I mostly see this behavior when pasting from MS Word. Although it happens when pasting from a website at times. I guess I have 2 questions. First, is it possible to keep formatting in a text field? Or second, is it possible to paste the information just as text?
  8. I could not get the statement to work, until I played around with the parent dropdown. I had both a static value "Select" with an empty value and the table of values. I changed the empty value to "0" and it started working. On another note, I had posted the question twice since I didn't see it appear on the forum for a few days so assumed I did something wrong when I posted. The second post was answered as well with a different solution that works as well. Thank you for the reply!
  9. Jan, thank you so much! Your answer worked perfectly. I've been stumped by this one for a while now.
  10. I am having trouble with a submission form getting a total amount. I can get the javascript to work if I enter values in standard fields. It works fine if I use custom values in a dropdown. Where the code does not work is when I use a cascading dropdown. The form is an internal billing request form. There is a price field which is based on the product selected in a previous form. When the select the product, the price goes into the cascading dropdown and fills in the form properly. After price is a field for additional charges and following that a field for discount. I have the following javascript in the footer of the submission form. <SCRIPT LANGUAGE="JavaScript"> function summation() { var Cost = document.getElementById("InsertRecordPrice").value; var Additional_Charge = document.getElementById("InsertRecordAdditional").value; var Disc = document.getElementById("InsertRecordDiscount").value; var Total_Invoice = parseFloat(Cost) + parseFloat(Additional_Charge) + parseFloat(Disc); document.getElementById("InsertRecordTotal").value = Total_Invoice; } document.getElementById("caspioform").onsubmit=summation; </SCRIPT> There's obviously something I'm not getting about the difference between entering a value and using a cascading dropdown. Technically, it doesn't even need to be a cascading dropdown if there is another way to get a default value from a table. If anyone can see where my error is, please let me know. I even created a stand alone form with only the 5 necessary fields just for experimentation and I'm stumped. Thanks in advance.
  11. I have a Submission form that has a Dropdown for "Product" and the next field uses a Cascading Dropdown for "Price". The following fields are "Additional Charges" and "Discounts". I want the next field to Total the previous three. I have placed the following code in the Footer of the Submission form: <SCRIPT LANGUAGE="JavaScript"> function summation() { var Cost = document.getElementById("InsertRecordPrice").value; var Additional_Charge = document.getElementById("InsertRecordAdditional").value; var Disc = document.getElementById("InsertRecordDiscount").value; var Total_Invoice = parseFloat(Cost) + parseFloat(Additional_Charge) + parseFloat(Disc); document.getElementById("InsertRecordTotal").value = Total_Invoice; } document.getElementById("caspioform").onsubmit=summation; </SCRIPT> When Price is a cascading dropdown, I do not get a value in the "Total" field. If I change price to a standard dropdown with custom values the above script works perfectly. In a perfect world, I really don't need a cascading dropdown for Price if I could figure another way to get the number into the field. The dropdowns are from a separate table called with the product name as column 1 and price as column 2. Any ideas on why this would be misbehaving? Thanks.
×
×
  • Create New...