Jump to content

Search the Community

Showing results for tags 'calculated value'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 6 results

  1. Hi all, i'm trying to convert a very basic spreadsheet into Caspio but I'm really disappointed to learn that there is no alternative to INDEX/MATCH. Caspio seems incapable of working with arrays, there is no INDEX function nor MATCH function, calculated fields allow SQL but SQL queries do not allow for select * so I'm faced with a technical constraint it seems. What I'm trying to overcome (what Excel does effortlessly on the fly) is do some calculations to come to a measure, then this measure is compared to each user's custom model settings (using values in the user table) to tell the user which model to use. With an INDEX MATCH in Excel I'm able to do this 2 dimensionally with one formula. After struggling with Caspio, I found as only way to do this is with virtual fields as calculated value using CASE OK a lot of lines of code to write but hey, the result would be there ... or wouldn't it ? The result get's into place but ... it takes about 15 seconds to calculate. Does anyone have any other way to achieve this or am I bound to start looking for another platform ? Kind regards
  2. Is it possible to count records in a table using javascript instead of a calculated field so the comparison is done right before submission? Or, is there a way to force fields with calculated values to refresh prior to submission? Possibly a custom button that refreshes the fields then submits the form? I've run into a snag using calculated values. Virtual15 is a calculated value and counts how many of a courseID are scheduled for the selected Lesson Date SELECT Count(Lessons_courseID) FROM _v_active_lessons WHERE Lessons_courseID=target.[@field:Lessons_courseID] AND Lesson_Date=target.[@field:Lesson_Date] Virtual8 is also a calculated value that uses CASE WHEN to determine if it's ok to schedule. We can only teach one of each courseID per day. The case statement is checking for other restrictions as well, but they are not dependent on a record count from the active_lessons table. CASE WHEN [@cbParamVirtual15] <> 0 THEN 'This lesson is scheduled for another teacher today. Please select a different day.' ELSE 'ok to schedule' END Then, I use this javascript in the footer to prevent form submission <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { // prevent form submit if not ok to schedule // if user forget to choose required fields date or time, proceed with submission to generate required field error // alertok variable prevents blank alert box var Input1 = document.querySelector("span[id^='cbParamVirtual8']").innerText; var alertok = 1; if (Input1 == 'ok to schedule' || Input1 == ' ') {} else {event.preventDefault(); if (alertok) { alert(Input1)} alertok = 0; } }); </script> The issue: If the lesson is not already scheduled for a selected date, two users can simultaneously select the same lesson for the same date and both will get the 'ok to schedule'. This allows both users to submit the form and I end up with double signups.
  3. I'm trying to find a function that will take a string and output only the numbers within that string. My string field values look something like this: C-123R C-1 Ladders R-32L where the beginning of the string is always 2 characters before the numbers start. But, the numbers can be either 1-3 digits long, and the chars after the numbers can vary greatly. I've tried a few different things like this and this but wasn't able to get it going. Any help is appreciated.
  4. I'd like to be able to timestamp when each individual column is updated. Basically, when column "x" is updated, the column "timestamp_x" is updated with the time "x" was updated and when column "y" is updated, column "timestamp_y" is updated with the time "y" was updated and so on. Is there a way to do this with a trigger? Or within the datapage with HTML or with a calculated value? Let me know if you know a solution! Thanks!
  5. Hi, I could do with some wisdom on how to calculate a date. I'm trying to set a date in a field using a CASE statement. I have Virtual Field 1 which is capturing today's date without timestamp (pls see image). I also have a number (in this case 30) stored in Virtual Field 4. I am trying to add the two together and have the result formatted without time stamp (e.g. 25 May 2021) but when I do this I get 31 Jan 1900. See my CASE statement below, the red part is the part that's not working. CASE WHEN DateDiff(day, SysUTCDateTime(), [@field:Date_1]) > [@cbParamVirtual4] THEN DateAdd(day, [@cbParamVirtual4],CONVERT(DATE, '[@cbParamVirtual1]', 103)) ELSE [@field:Date_1] END Many thanks Jay
  6. Hello, I am a newbie and one that does not have any coding background. I wonder if anyone knows if I can pass a calculated value from a DataPage report to another table? Thanks!
  • Create New...