Jump to content


  • Content Count

  • Joined

  • Last visited

About BillW

  • Rank

Recent Profile Visitors

27 profile views
  1. Hi Again, FYI, I've also tried setting an anchor and using this to set the background color. By using the three combinations below and the one shown in the current code, I can dance all around the field, and change background color, but cannot figure out how to change the background color of the field itself. isi.parentNode.parentNode. isi.parentNode.nextSibling. isi.parentNode.previousSibling.
  2. Hi CoopperBackpack, Thank you for the quick response. Your solution for accessing the value for ODE_labyrinth_Tol is "spot on". However, neither of our solutions for changing background color works. I tried ".backgroundColor" and ".background". This is confusing as I've done what I thought was exactly the same thing to change background color of a numeric field in another submission form. The only difference I can discern is that ODE_Fan_TIR is the 'change' listened for in the addEventListener statement. Updated Code: I inserted an alert within the IF statement to make sure the subtraction was performed properly, then entered a value of fan = 0.004 with tolerance = 0.002. The alert was activated properly; however, I receive no console error nor did the background color change to 'red'. The updated code is shown below:
  3. Hi Vitalikssssss, The field with ID "ODE_Labyrinth_Tol" is the calculated field. Did you mean to say that this code: let tol = document.getElementById("InsertRecordODE_Labyrinth_Tol").value; should be rewritten as let tol = document.getElementById("InsertRecordODE_Labyrinth_Tol").innerHTML;? Regardless, I still receive the same console error message stating cannot read null. Please see below
  4. Hi, I have an application where I wish to set the background color of a field to red when a measured value is found to be greater than an allowed tolerance. The allowed tolerance is extracted from a lookup table using a calculated field. This calculated value is calculated before the measurement is entered. For example, in the Submission datapage shown below a Job No is first selected, then a Motor RPM value is obtained from one lookup table and the Tolerance = 0.003 is obtained as a calculated value from another lookup table. The User then enters a value for Fan. This all works fine; however, the code that reads the calculated value for Tolerance does not. See below...... The calculated field is shown below. HTML block 3 is used to set the background color when Fan > Tolerance. The HTML block is positioned following the fields shown above. The field labeled Fan is ODE_Fan_TIR. The field labeled Tolerance is ODE_Labyrinth_Tol. Since Fan > Tolerance the background color of the Fan field should be red. In the script shown below, a console error indicates that the calculated field value (Tol) is null. The error occurs in the following line of code " let tol = document.getElementById("InsertRecordODE_Labyrinth_Tol").value;" How does one obtain and use a calculated value in an IF statement before the Submit button is pressed?
  5. Issue resolved by utilizing caspio's built-in function that uses an HTML block inserted into the child datapage that "links" to the parameter passed from the parent datapage
  6. Hi SinJun, Thank you for responding. I have attached an update to the first file. On the very last page I show that while the coding error appears to be eliminated, the value of the field I wish to assign to a var "ID" is not defined. The code actually opens the table as requested; however, the parameter is passed as 'undefined', since it is undefined when the var statement is executed. I wonder if the var is undefined because I have no way to select the specific record that I wish to read the value of CA_ID from? The reason may be because this tabular table is configured as 'read only'. I can only highlight a record. Passing Datapage Parameter 7-29-2020.docx
  7. To Whom It May Concern, The attached file presents the workflow, defines the setup/scripting, and an issue encountered when a variable is assigned a value and then passed between two tabular datapages that are set in view only modes. The solution provided was not the first attempted. The data source tables for this workflow are linked 1:many, but 'I' was unable to take advantage of that with Tabular datapages. My second attempt was to simply access the linked data via a button with an associated passed parameter. Thanks in advance, BillW Passing Datapage Parameter 7-23-2020.docx
  • Create New...