Jump to content


Caspio Moderator
  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    bahar_vm got a reaction from RosaWalton in Tracking of Stats Possible?   
    Hi Steve,
    Caspio does not provide stats reports, but third party tools can be integrated and used to track activity. You can use for example Omniture or other third party tools to track your analytics.
    Bahar M.
  2. Like
    bahar_vm got a reaction from hstange in Allow users to edit records only for a certain timeframe?   
    There is a solution. You need to have two separate reports, one only for editing purpose for example through Details page (make fields editable on the details page) and another one for viewing records so fields on details page will be Display Only.
    You also need to create a timestamp in your table to record the date and time upon submission. See how at http://howto.caspio.com/release-notes/w ... 6-9-5.html.
    Then in the report which is for editing purpose, add the timestamp field in to the filtering fields or a hidden search fields (if your report has search form). Then in the next step "Configure Filtering Fields" (or Configure Search Fields), create two criteria using the "New Criteria" insert button, choose "OR" as logical operator then setup the Comparison Type for each criteria as "Previous X Days" value 7 (set the value as desired), "Today".
    This way the record will only show up if the submission date is within the past 7 days. Does this help?
    Bahar M
  3. Like
    bahar_vm got a reaction from MAmbrose in time stamp field based on selection in drop down?   
    The script below records date/time (timestamps) when a specific field (in my case Status field) is updated. You don't need any virtual field. Place the script in the Footer of your details/update page.
    Status is my dropdown field (it could be a text field as well). Time_status_edited is a hidden field to store the timestamp upon updating the Status field. <script type= "text/javascript"> function getT() { var prevValue='[@field:Status]'; if(document.getElementById("EditRecordStatus").value != prevValue) { document.getElementById("EditRecordTime_status_edited").value = '[@cb:Timestamp]'; } } document.getElementById("caspioform").onsubmit = getT; </script>
  4. Like
    bahar_vm got a reaction from TWIRED in Store Value Of Calculated Field   
    Calculated field in results page is generated on the fly each time results page is loaded. It cannot be saved into the table. Calculated field in web form can be saved into the table after submission by using JavaScript. In details page, you can create another field and make it hidden, then select "DataSource Fields" from "On load assign" dropdown and select your calculated field from the list. This enables passing the calculated field as parameter into the new field. Make sure passing parameter in your DataPage is enabled from the second wizard screen.
  5. Like
    bahar_vm got a reaction from TWIRED in Hiding virtual cascading dropdowns in web form   
    Replace the line
    document.getElementsByName(fieldName).disabled = true;
    document.getElementsByName(fieldName)[0].disabled = true;
    Bahar M.
  6. Like
    bahar_vm got a reaction from lmooring in Enable multiple selection for listbox with virtual fields   
    Here is the solution to implement listbox on search (submission) form as virtual field to function as multi-selection and pass the selected options separated by OR to the results filtering.
    The list box is a virtual field, in our example: "cbParamVirtual1"
    An additional virtual field, in our example "cbParamVirtual2", is needed to store the OR separated string and pass to the next page (results page). You can make this virtual field "hidden" since it is only neccessary for the program and not human use.
    Adjust the script if you have more or less listboxes in your search form. The virtual field ID also should be adjusted accordingly; you can find the ID using Firebug and adjust the X in "cbParamVirtualX".
    The script goes to the footer of the Search/Submission DataPage "Configure Fields" wizard screen. 

    <script type="text/javascript">
       var fieldName = "cbParamVirtual1";

       var x1=document.getElementsByName(fieldName);

    function splitAndParse()
    var result = "";
    var cleanResult = "";
    for (var i = 0; i < x1[0].length; i++) { 
    if (x1[0].options[i].selected) { 
    result += "\""+x1[0].options[i].value+"\"" + " OR " ;

    if (x1[0].length > 4) { cleanResult = result.substring(0,(result.length-4)); }
    document.getElementById("cbParamVirtual2").value = cleanResult;


  7. Like
    bahar_vm got a reaction from ezraik in Use Totals & Aggregations Values In Calculated Fields And Graphs   
    The solution provided above calculates the average properly however since it uses calculated field the average is displayed on each record which I don't think is desired. Here is another approach:
    1) Add two Calculated Fields: Sum and Count

    2) In the Sum Calculated Field enter the formula:
    IsNull([@field:field1],0)+IsNull([@field:field2],0)+ ... +IsNull([@field:fieldn],0)
    3) In the Count Calculated Field enter the formula:
    (IsNumeric([@field:field1])+IsNumeric([@field:field2])+ ... +IsNumeric([@field:fieldn]))
    This formula allows you to calculate the number of non blank values.

    4) Add a Totals & Aggregation element, select both Calculated Fields: Sum and Count, use the function SUM.

    5) Add the Header & Footer element and in the Footer enter the JavaScript code below:
    <SCRIPT LANGUAGE="JavaScript">
    var sum = document.getElementsByClassName("cbResultSetTotalsData cbResultSetTotalsDataCellNumberDate")[0].innerHTML;
    var number = document.getElementsByClassName("cbResultSetTotalsData cbResultSetTotalsDataCellNumberDate")[1].innerHTML;
    var avg=sum/number;
    document.getElementsByClassName("cbResultSetTotalsData cbResultSetTotalsDataCellNumberDate")[0].innerHTML=avg.toFixed(2);
    document.getElementsByClassName("cbResultSetTotalsData cbResultSetTotalsDataCellNumberDate")[1].innerHTML="";

    The JavaScript does the final calculation and write the final value into the aggregation row and blank out the count cell. avg.toFixed(2) rounds the number to 2 numbers after decimal point. You can adjust it as desired. document.getElementsByClassName("cbResultSetTotalsData cbResultSetTotalsDataCellNumberDate")[0] ... 0 refers to the first data cell in totals and aggregation row and 1 refers to the second data cell and so on... Use F12 in browser to open developer tool where you can inspect page elements and find their id, class, ....to adjust your scripts when needed.
  8. Like
    bahar_vm got a reaction from Domco in Refresh Parent Window After Closing A Popup Window   
    One reason is the security restrictions since parent and child windows have different domain names. This happens if the parent/opener DataPage is embedded in your domain (yousite.com) and the popup DataPage (the one which is auto submitted) is called by direct URL (bn.caspio.com).
    To fix the issue, deploy the popup DataPage (the one which is auto submitted) on same domain as the opener and then use the following code in Destination and Triggers screen inside Display a Message text/HTML area:
    <script> window.close(); window.onunload = function(){ window.opener.location.reload();} </script>
  9. Like
    bahar_vm got a reaction from BjornSkifs in Placeholder In Text Field   
    I think this article will help you to accomplish this:
  • Create New...