Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Vitalikssssss

  1. On 5/11/2017 at 11:16 PM, wdandrews said:

    I have a data table with that could have multiple locations for a physician. From that data table I would like only one unique physician name display after the user enters their search criteria. From the list of names that match the criteria I would like the user to select the physician name and on the next page have it display all of the locations for the physician. From that list of locations the user would select one and have the details display for the location. How do I build the first query to get the unique physician name that matches the criteria? In SQL I could use distinct, but I don't see that as an option when building a view.


    Hello wdandrews,

    I would suggest using a special form element on your search form called Cascading:


    This element allows restricting a possible amount of option in child field based on the selection in parent field.

    Please note that "distinct" option is enabled by default for a different type of form elements (dropdown\listbox\radio button etc).

    Hope this helps.


  2. On 5/18/2017 at 4:53 AM, MyNameIsSean said:

    Hi Vitalikssssss,

    Thank you for your help, but that is not what I meant.

    I would not like to send the verification via email, but rather verify it through the previously mentioned website such that it gets verified automatically as an active email address.

    The reason is that the email addresses will not be user-submitted, rather they will be added by staff members, so we do not want to send unsolicited verification emails upon entry, but would still like to verify that those email addresses are valid and active, for our marketing purposes.

    P.S. sorry i did not mean to downvote your reply, I was just trying to figure out how to post a reply to your reply lol

    Hi MyNameIsSean,

    Caspio DB can only consume API calls currently.

    Perhaps you can take a look Zapier if they have an available Zap for email verification upon creating a record in Caspio.

    Hope this helps. 

  3. On 5/16/2017 at 1:52 PM, logistics said:


    how would I go about getting the script to run only if a field has a specific value?


    I've tried this, but it doesn't work:

    var checkvalue;
    if (checkvalue == "Yes"){
    function hide() {
    document.getElementById("Mod0EditRecord").style.visibility = 'hidden';


    I've also tried this

    var checkvalue;
    if (checkvalue == "Yes"){
    document.getElementById("Mod0EditRecord").style.visibility = 'hidden';


    Any help would be appreciated.



    Hi Julien,

    Did you put your script in Details datapage?

    Please note that you use the wrong syntax to reference the field.



    I would highly recommend looking at this Forum post:



  4. 17 hours ago, nuimage said:

    Hello Vitalikssssss, 

    Is there a way to update the record dynamically without creating a Single record update form?  I have a registration page that list all "Published" courses.  This status is set when the course is created.  However, when the criteria is met (student count >= MaxParticipants allowed for course) I would like to update the the field "CourseStatus" with the value  "Not Active".  Essentially, the updated status would  remove the course from the Published list of courses.  

    Thanks again for your help!




    Hi nuimage,

    I do not beliave that this is possible.

    Perhaps you may take a look at method described on Howto:


    Hope this helps.


  5. On 5/10/2017 at 9:21 PM, MattFL said:

    How can I authenticate user passwords against a "password" type field in a Caspio view via the REST API?  "Select" does not work with fields of type "Password" and I can't seem to figure out how to access the data. 

    I'm writing a mobile application that uses the REST API to access our data via "views".  One of the fields is a "password" field, and I need to be able to compare the password that the user enters into my application with the password stored in the database.  I don't need to extract the password field, but I do need to know if the password entered by the user matches what's stored in the database.  Any tips on how to do this, or links to documentation, would be greatly appreciated. 


    Hi MattFL,

    I guess that is a system security restriction which you will not be able to overcome.


    You may try to authenticate the user based on another field type. 


    Password fields are special data type fields that are meant for storing encrypted values. You cannot obtain the value stored in password fields. All requests that attempt to get their values via Select or in other ways such as in Criteria, cause an error. When all fields of a table or view are returned via “Select *” or empty field list, password fields are skipped.




  6. On 5/15/2017 at 1:20 PM, MyNameIsSean said:

    Hello, I have a table with the columns email_address and email_verification.

    Ideally I would like the email to get verified through a site like quickemailverification.com when the email is entered or submitted, and if it passes the verification, it will get updated as a "verified" value under email_verification.

    I am wondering if the datapage allows me to carry out a getJSON request (or getAJAX request) to the API using the email_address input, then pass the result on to the email_verification field automatically.

    If it helps, the API is as such:


    and the response is as such:


    Thanks in advance.

    P.S. I am not very well versed in both Caspio and Javascript; I am still learning so I'd appreciate if you could please be as explicit as possible, thank you.


    Hi MyNameIsSean,

    How you considerate to implement an email verification process as described in this HowTo article:


    It should be much easier.

    Hope this helps.


  7. 7 hours ago, McNamara said:

    How can I remove the empty space between the "No file Chosen" label and the "Add" button that displays to the right of the "Chose File" file upload button?  I can't find the "No file Chosen" in any of the Styles or Localizations.  I need to reduce the empty space to make the button, the label and the Add button all show up on my mobile screen.



    Hi McNamara,

    You may try to change attributes in class ".cbFormFile" in order to adjust the spacing.

    Hope this helps.


  8. Hello nuimage,

    Please note that  @calcfield2 will have value after page load as per your described workflow, hence.

    I would suggest having two Datapages (Report&Single record update form) to replicate your workflow.

    On your Report Datapage you can place a link in HTML block to Single record update form and pass @calcfield2 value as a query string.


    Hope this helps.

  9. 16 hours ago, bbeshlian said:


    I built a Tabular DataPage which includes a calculated field that indicates if a record needs correction. Is there a way to display only the records that need correction? 




    Hi Bill,

    I would suggest using Formula field in the table instead of the Calculated field.


    You may use "CASE" statement to create records correction logic in formula field.  

    Create a Report with predefined filtering criteria based on formula field in order to display only records which need a correction.

    Hope this helps.





  10. On 5/2/2017 at 9:20 PM, Craigs said:

    I'm not sure how the Cascading elements would help.    I have two tables that have a one to many relationship.    I have the setting to show job name on forms rather than the job number.   Everything works well on the form; however when I go to insert the job name into an e-mail it only shows the job number.    I'm assuming there is a way to send the job name, not the job number.    

    Table Relationship .docx


    Hi Craig,

    Note that then you select a parameter in the email set-up it uses "value" and not display value.

    I am afraid that you cannot reference "display value".

    You need to have Virtual field with form element "Cascading TextField" selected. This element will filter the records in Job_Table by job number and pickup the job name.

    Please use method like in this article if you do not want to display Virtual field on form.

    Hope this helps.


  11. On 4/22/2017 at 11:53 PM, roattw said:

    I would like to be able to have the user select TIME OF DAY something occurred (H:M AM/PM) and have those selections populate a Time of Day field.  Exactly like the calendar popup, but just time, date not needed really.

    Or concatenate 


    Selection box 1 = Select Hour  (1-12)

    Selection box 2 = select minutes (probably 5, 10, 5, ...00)

    Selection box 3 = Am or PM

    Result of the three choices populates the Time of Day box: ie 2:25 PM

    Surprised its just not an option in calendar....


    Hi roattw,

    You can concatenate several fields in single value with Formula field:


    Hope this helps.

  12. 16 hours ago, cigarprofiler said:

    Hi Vitalikssssssss,

    It worked, thank you for your help. I have one additional question:

    From the first form, I pass the lineid to link to the next form. So far, so good.

    From the first form, I also pass the brandid.

    In the second form (which is based on the models table), I can then retrieve the brandid as a virtual field. My question is: is there a way to look up the brandname in the brands table? That would be a "nice to have", not strictly necessary to make the submission work.

    In more general terms, I guess my question is: can I automatically look up a value based on a passed parameter in a table that is not in the table on which the DataPage is based?


    Hi cigarprofiler,

    You can retrieve the brand name by using Cascading elements.Cascading element will filter the brand table by value in the virtual field (brand_id).

    Here is a link to the tutorial article: Cascading-elements

    Hope this helps

  13. 19 hours ago, mikeg said:

    Hi Vitalikssssss


    Thanks for your reply. I realized the fields were set to text which is why I was getting NaN which I was able to resolve.


    The next issue is to create an estimate, I need to be able to enter the numbers on the field, then call the calculate function to give the values as they are not yet stored. Currently, I need to enter the values, submit the form, then reopen the form so the values load then the calculate function works. 



    Hi mikeg,

    Your syntax to store a value in the variable is incorrect.


    var a = [@field:Area1_Sq_Ft]

    You should reference Field value by id to assign the value to a variable:

    var a = parseFloat(document.getElementById("EditRecordArea1_Sq_Ft").value);

    Check this post for more information js-perform-a-calculation-on-values-entered-in-a-webform





  14. On 4/1/2017 at 0:52 AM, mikeg said:

    I realized the calculations do not work until the form has been submitted then opened again with values loaded. Is there a way to have the values calculate when fields were blank on load if you populate while page is open?



    Hi mikeg,

    I assume that you are using "Single record update" form in your case and you have initial values already stored in a table, am I correct?

    If so it seems like field value marked as "NaN" does not have any value stored. 

    Please describe how do you retrieve the values such as  [@field:Area1_Sq_Ft] ?


    document.getElementById("EditRecordArea1_Subtotal_Cost").value = IsNull([@field:Area1_Sq_Ft_Cost],0)+ IsNull([@field:Area1_Vertical_Cost],0)+ IsNull([@field:Area1_Steps_Cost],0)+ IsNull([@field:Area1_Cracks_Cost],0)+ IsNull([@field:Area1_Pitting_Cost],0)+ IsNull([@field:Area1_Removal_Cost],0)


    This code will not work since you have not defined IsNull function between <Script> tags however, it will work in Caspio Calculated/Formula fields since this type of fields has isNull function defined.



  15. Hi mdav20,

    Your thought is going in the right direction.

    I would suggest having a table to store the data about installation/removal of tires. You can place a Formula field datatype to calculate hrs difference between hrs "installed" and "removed".

    Here is a link to Formula field article: Data-types/formula-fields

    You can use Pivot table report or Tabular Report (with grouping by tire_ID ) to calculate total hrs in use for each tire.





  16. Hi Golfedad,

    I would suggest to use JS that redirects the user based on check performed on one of Authentication field.

    Below you may find sample code which I have used previously:

    <button onclick="myFunction()">Add Item </button>
    <script type="text/javascript">
    function myFunction() {
    var cb_text = '[@authfield: Profile_Parm1]';
        if (cb_text == 'Admin') {
        window.location = "URL_1";
        } else {
        window.location = "URL_2";

    You may place above code in Header/Footer/HTML block of Datapage.

    Please make sure that you disable HTML editor.

  17. JS code snippet below will copy value from one criteria field to another:



    1.       Set-up criteria fields;

    2.       Put following javascript code snippet in the Footer:

    function onblurcalculate() {

    var count =document.getElementById("Value9_1").value;

    document.getElementById("Value9_2").value = count;


    document.getElementById("Value9_1").onblur= onblurcalculate;

    3.       Replace highlighted name as per below:  

              -   X is the form element order, which starts at 1 and increments based on the order of the element in the form.
              -   Y is the criteria. It starts at 1 and increments based on the criteria order. It is always 1 if the field has no extra criteria.




  • Create New...