Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Mathilda

  1. On 5/30/2017 at 1:58 AM, vanderLeest said:

    I wonder if someone found or came across a way to add an automated sequence number (for example, in the form of the current record count) to a child form based on a one to many relationship, for example each interested person for a specific house gets a sequence number from 1 for the first entry to n for the most recent entry. For another house the sequence start again at 1.




    As far as I understand you need to create a queue of people who wants to see the house. I suppose that you have a submission form where person can submit an inquiry. That form should receive house ID, then add a virtual field, make it to be cascading drop-down and sort values in descending order. This will let you see how many people are already in the line, then increment a value (+ 1) using java script and write into the table

    The script will be like that:

    <SCRIPT LANGUAGE="JavaScript">
    function calculate()
    var v_increment = parseFloat(document.getElementsByName("cbParamVirtual1")[0].value);
       document.getElementById("InsertRecordField2").value = v_increment+1;


  2. On 5/31/2017 at 7:29 PM, Esraaa said:

    Hello,  Any suggestions how could the following be done!

    I would like to use information from two tables
    First table (Orders) contains Customer_Email and Product_ID (Filled automatically using Zapier Integration)
    Second Table (Products) contains Product_ID and Product_URL

    When a new order is made, an email message should be sent to the customer’s email contains the related Product_URL


    Note: Zapier does not read Capsio Views  also does not update a table

    As far I understand Product ID in the orders table if a foreign key of the Product table, therefore you may create a relationship and display Product URL instead of ID. This article should be helpful. Then you need to insert this lookup value into the email body. It works if you use Caspio emails, I'm not sure regarding Zapier emails

  3. On 6/1/2017 at 5:40 PM, Esraaa said:



    Is there any way to automatically and instantly insert new view's records into a separated table?


    As far as I know this kind of  triggers are not available yet, it requires coding on the server level. This team should be able to implement that.

    You may trigger inserting a row in the table only via Zapier and insert record into another table, if it works for you

  4. 12 hours ago, LuluSW said:

    Caspio minds

    I have an app that has a javascript validation in the footer of a submission form.  It basically prevents someone from making reservations on previous dates.

    It's something like: 

    if (newdate < newtoday ) { 

       alert("Choose a future date.");

    It works fine.  However,  I just found out that after 3 consecutives tries,  the alert message box will come up with a checkbox with this option:  "prevent this page from creating additional dialogs"

    If the user choose to prevent addtional dialogs,  this system will bypass my code,  and the user will be able to make reservations on past dates.

    Is there anyway to prevent the alert function to allow users avoiding dialogs? 

    I also tried document.getElementById('msg').innerHTML instead the alert function but it really does not work well.

    I am using Wordpress and Firefox.  

    Any help will be higly appreciated.

    I would recommend using a function with "return false", it won't let submit a form is date is wrong.

    I created a script for the similar request, you may check it here

    Hope that helps :)

  5. 21 hours ago, DesiLogi said:

    I'm have a submission form that uses custom buttons (because of the need to show/hide Submit due to Rules) to do the Submit. I need, after submitting the new record, for the destination to go back in History a page (or two if the submit refresh logs the form as a page in History). 

    I can't get the code to run in the Destinations wizard, using Message and html editor disabled. Here's what I have so far: basically the data submits correctly and a new record is created but I get no redirection to previous url. 

    <SCRIPT LANGUAGE="JavaScript">
    function goBack() {
    document.getElementById("caspioform").onsubmit = goBack;

    The other option I tried was to put the js in the html block with the custom button for Submit. It does run the 'go back' code but the new record doesn't actually get submitted. So it's either the 1st choice with record submitted and no back-redirect or the 2nd choice with no record submitted and back-redirect working. 

    If someone could clarify how to get the actual 'submit' AND the 'back-redirect' to work that'd be really great. Here's the custom button code in the html block, if that helps: 

    <div style="text-align: center;"><input class="cb_custom_btn" type="submit" onclick="goBack()" value="SUBMIT" />
    <SCRIPT LANGUAGE="JavaScript">
    function goBack() {
    document.getElementById("caspioform").onsubmit = goBack;


     Try calling a function onload:

    <SCRIPT LANGUAGE="JavaScript">
    window.onload=function goBack() {

    Hope that helps ;)

  6. 1 hour ago, NikkiC said:

    Hi there,

    I would like to timestamp a field (Test_Completed), but only if it hasn't already been timestamped and only if a different field (Actual_result) has content.

    I found a forum answer about timestamping a field, and have tried to modify it to include my conditions, but I am not too good with JavaScript!  This is what I've done, can anyone help??

    <SCRIPT LANGUAGE="JavaScript">
     /* Declaration and initialization */
     Stamp = new Date();
     var v_TimeStamp;
     Hours = Stamp.getHours()
     Mins = Stamp.getMinutes();
       /* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */
     v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear() + ' ' + Hours + ":" + Mins);
     if ('[@field:Actual_result]' === 'input.length >1' && '[@field:Test_Completed]' === "") {

    Many thanks


    Hi Nikki,

    I edited your script a little bit, try inserting script in the footer:

    <SCRIPT LANGUAGE="JavaScript">
    window.onload=function myfunc(){
     Stamp = new Date();
     var v_TimeStamp;
     Hours = Stamp.getHours()
     Mins = Stamp.getMinutes();
       /* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */
      v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear() + ' ' + Hours + ":" + Mins);
     if ('[@field:Actual_result]'.length>1 && '[@field:Test_Completed]' === "") {

    Both fields should be editable text fields on a datapage, if you need to hide a field, you may use display:none attribute, like explained here

  7. On 5/15/2017 at 3:57 AM, logistics said:


    I have a datapage set to send an email to the user when their record is updated.

    However, the email is sent regardless of which field is updated, and regardless of how many times it is updated.

    Is there a way to either:

    • Send the email only when a SPECIFIC field is updated on the profile? If so, how? (preferred option)
    • Only allow the email to be sent once? If so how?


    Many thanks in advance for your help.


    Hi Julien,

    Yes, it's possible. You may trigger changing a field and when field is changed, insert email address into virtual field.  Then using virtual field in Email field for your acknowledgement email. Since I don't know type of your datapage, I created code for details datapage.

    Insert script in the footer of your datapage:

    <SCRIPT LANGUAGE="JavaScript">
    function insert()
    var x= document.getElementById("EditRecordEmail").value;
    document.getElementById("cbParamVirtual1").value = x;

    Insert your fieldname which you would like to trigger instead of Field1

    Also I assume that you have email field on your datapage, so you need to insert your field name instead on Email in my code.

    This way an email will be sent only if you changed value in specified field

    Hope that helps

  8. 1 minute ago, Aurora said:

    Hi all, 


    Does anyone know how to make image responsive? There is a responsive code for image, but it doesn't work on datapage when you have an image. 



    Hi Aurora,

    I added the following code to responsive code in the header of my details datapage:

    #datapage-form img {
    width: 100%; 
    height: auto;

    Hope that helps!

  9. On 5/3/2017 at 3:31 PM, roattw said:

    I have a script forcing numeric characters only in a couple fields (thanks May Music).  


    function isNumberKey(evt){
        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;
        return true;
    document.getElementById('InsertRecordFIELD1').onkeypress =isNumberKey;


    I had several fields like this so I cheated and created one script for each FIELDNAME (I know, I know, Im still learning  :^).  How could I combine all fields into that one script above?  I tried this but it didnt work:



    Just write two additional lines which will call function for each field:

    document.getElementById('InsertRecordFIELD1').onkeypress =isNumberKey; 

    document.getElementById('InsertRecordFIELD2').onkeypress =isNumberKey;

    document.getElementById('InsertRecordFIELD3').onkeypress =isNumberKey;


  10. 4 hours ago, LuluSW said:

    Caspio minds

    How can I use a report form to select an item from a table, and after the item is selected I save it as a foreign key on another table?

    For example,  imagine two tables:  Users and Cars.   A user wants to buy a car.  So I use a report form to show the items from Cars table.  Once the user selects the car he wants, the app will save the CarId on the User table.

    You need to create a separate table for orders and pass parameters in query string to this table from report datapage.

    Create a submission form and receive needed parameters onload: customerID and car_ID, insert autosubmit script, save the datapage and get the direct deploy URL of the datapage. Autosubmit script will let you submit data automatically.

    Then place a link to the submission form in html block on report datapage. E.g:

    <a href="URL_of_the_datapage&Customer_ID=[authfield:Customer_ID]&Car_ID=[@field:Car_ID]">Link name</a>


  11. On 5/11/2017 at 3:05 PM, Simong said:

    I have a report page with Grid edit option and while in Grid Edit mode I would like to assign current date and time to "checkin_Time" field if "checkin" field is checked. Is it possible?

    I added some JavaScript code in the footer, but it seems never get called.

    Any help? Thanks.


    grid edit is a specific mode. You may contact them, perhaps they will be able to implement that

  12. On 5/13/2017 at 2:27 PM, LuluSW said:

    Hi. How can I show an image from an autentication field on a HTML datapage?

    I want to show a company's logo after they log in a SaaS app I'm building. So I keep this image on an autentication field and want to show on an HTML datapage that I'm using as the reader for several webpages of the application.

    Thank you!



    You may take the field using parameter picker and add a back slash / to the parameter:

     <img alt="" src="[@authfield:Photo/]" style="width: 200px; height: 200px; margin: 1px;" />


  13. On 5/10/2017 at 11:57 AM, mdav20 said:

    Thanks for the information, I can't seem to get it to work still.  Should I type out the field names and leave the ( ) or should I use the drop down list to select the field and type of field which adds the [ ]


    Thanks again

    You need to insert your field names after EditRecord, for example if your field name is Status, the syntax will be: ("EditRecordStatus"). More information can be found here.

    Please note, Java Script is case sensitive.

    Hope that helps.

  14. On 5/1/2017 at 2:03 PM, swthrt13 said:

    I'm brand new (in fact still in my trial).  I'm trying to figure out how to add a button on the results page in order for the user to generate a "quote" request for specific items on the list.  I've been trying to search and stumbled upon one to auto-submit selected records from results to another table -- but I don't quite understand the instructions.  This would be closest to what I'm trying to do; but not sure if I'm setting it up correctly --- little to no coding background here so that doesn't help either.  Also, my "add" button doesn't click in the preview mode? So I don't know if my image is set up correctly either.

    I posted script to the similar inquiry, you may find it here. Also you need to pass field parameters in query sting

  15. 16 hours ago, mdav20 said:

    Is there a way to automatically check a yes/no box if another field has data in it? For example I have a yes/no if a shift is complete I would like it switched to yes once the end hrs has data.  I need to be able to do this in a report though if possible because of the way I have it set up.  I'm thinking it will be javascript but not sure how to do it.




    I would recommend checking length of the value. You may insert the following script in the footer of details datapage:

    window.onload= function()
    if (document.getElementById("EditRecordYour_field").value.length>1)

    Don't forger to change fields names in my script


  16. 8 hours ago, oscargoldman said:

    We have data that has apostrophes in it (Men's, Women's, Kid's) and we are trying to use these data fields in formulas but the apostrophe is causing issues.  How do we handle this.  The example of the formula is: 


    WHEN [@field:Gender] = 'MEN'S' THEN 1


    You need to  double-up the single quote character:

    WHEN [@field:Gender] = 'MEN''S' THEN 1


  17. On 4/28/2017 at 3:37 PM, piepercfo said:

    I just started using Caspio this week. I have a simple database project that I would like to share only with specific google users. I have successfully created a Tabular DataPage Report that is configured on the Access and Security section to Restrict Access by Requiring a Connection. The connection is successfully configured to use only Google ID Services. When I do this, any authenticated google/gmail account can be logged into my DataPage. That part works.

    Ultimately, I would like to restrict the access to only specific google accounts. I can't seem to find any documentation on how to get that to work.


    I have tried to instead create a new Authentication. One that is configured  with a Setup option of "Custom" and a User Validation Method of "ID Services Only". Then I enabled only Google ID Services, and selected by Authentication Data Source (table) to use the "social login field" of Username (as well as entering the same Client ID & Client Secret that worked in the Connection I created). But I cannot log in to the database with any of the accounts I added to the Authentication Data Source. and I've edited the DataPage's Access and Security to use this new Authentication (rather than the Connection). But when I try to authenticate, the Google login screen appears, and it accepts my passwords, but just returns me to the Caspio login page with the message "Unknown user. Contact the app administrator for assistance." at the top.

    So my suspicion is that something's wrong with the record data in the authentication table I'm using as the data source.

    It has only four fields:

    Username Text(255) 

    Password Password

    Email Text (255)

    Name Text (255)

    For example, say I have an account with the email of bill.smith@gmail.com

    I am using the Username field as the Authentications "Social login field" and I've tried populating that field with all the variations I can think of:

    "bill.smith", "billsmith", "billsmith.gmail.com", "billsmith@gmail.com"

     but no matter what that contents, I still continue to get the "Unknown user. Contact the app administrator for assistance." message, after logging in successfully to that account. The Google ID Services seems to be working, but the the Caspio Authentication part doesn't.


    So I'm stuck. Any ideas how to make this work?




    Screen Shot 2017-04-28 at 5.35.19 PM.png


    I suppose that this tutorial video should be helpful.

  18. On 4/28/2017 at 10:01 AM, Breee said:


    I need to pass an autovalue parameter into a pop-up window.

    I'm using a multi-page submission form. The second page of the form has the pop-up html block to capture the autonumber (ProjectID) generated on the parent form. 

    My autonumber field is "ProjectID." I can view the 'Project ID' on the second page of the form; it will not however pass into the pop-up window.  

    This is the code that I have and it's only working for new information entered. The autonumber "Project ID" field that I'd like to pass into the pop-up window is not working. All new data is going  to the table except the "Project ID." 


    Code being used is as follows:

    <a class="cbMenuItem"href="#"
    &quot;menubar=1,resizable=1,width=500,height=500&quot;)">ADD BROKER</a> |


    Any assistance would be greatly appreciated. I've read up on parameters, query strings, pop-up windows, and used the Caspio Link Menu generator for the code. I'm thinking that something is still off with the syntax as it relates to the parameter be passed. 




    Hello Bre,

    You need to use syntax [@InsertRecordProjectID] only when you receive a parameter onload in a field on the second datapage.

    The query string will be like this: http://www.TTTest.com/brokerlookuptest.html?ProjectID=[@ProjectID]


  19. On 4/26/2017 at 4:59 PM, Craigs said:

    I have an auto-generated email working on my datapage submission form.   The table that the form is drawing from is using the unique identifier (Employee_ID) to track the employee that is logging or entering the item in the form.    I would like for the employees name to be displayed on the e-mail, so the recipient knows who the email is coming from.     I see that I can choose from any data source field that is on the original table and insert that into the subject or into the body of the email.    The problem is that when I insert the only option that makes any sense (Employee_ID) the email is sent with the number rather than the employee name.     How can I get the email to display the name?   I have the same issue with the Job_ID.   I would like to also include the job name.

    Notes: I've already created a relationship and stated to display the name rather than the ID.


    e-mail Field.docx

    Update:  I was able to solve the employee ID by inserting a hidden virtual field into the page, and then entering that data source.     Since that came from the authentication table, it was available.   I'm still at a loss for how to insert the Job name in lieu of the Job_ID.

    Hi Craigs,

    I suppose that you may add a virtual field and gen name of the job using cascading elements. If you don't want to display that field using display: none attribute, like in this article

    Hope that helps

  20. 7 hours ago, geoffdude said:



    I have a data page/HTML page I'm building and I want to place my company's header and footer on the page via an iframe.

    When I place the iFrame code though, the page will NOT show the header or footer content.

    Any idea why this may be happening? And, can it be fixed?

    Here's the iframe code:

    <iframe src="http://www.ocregister.com/headerfooter?load=header" style="border:0px # none;" name="ocrHdr" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="175px" width="1200px"></iframe>

    Thanks in advance,


    Hi Geoff,

    It looks like the reason is mixed content. If you load unsafe code in your browser, the header will appear.

    The source of the iframe has http protocol, the datapage is on the https. 

    I found a few posts here and here which may be helpful

  21. Hi everyone,

    I just want to share this solution.

    If you need to generate notification emails to  email addresses selected in a list datatype,  you need to:

    - add a virtual field;

    - select a virtual field in the field "to" when you set-up notification email;

    - insert the following script in the footer and replace list_of_emails with name of your list datatype field:

    function ListToVirtual()
    var ListValue = document.getElementsByName('ComboBoxInsertRecordlist_of_emails')[0].value;
    var VirtualValue = document.getElementById('cbParamVirtual1');
    VirtualValue.value = ListValue;
    var str = document.getElementById("cbParamVirtual1").value; 
        var res = str.replace(/,/gi, ";");
        document.getElementById("cbParamVirtual1").value = res;


  • Create New...