Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Ba2sai

  1. Hi Jon,


    Yes it is possible to write a custom style for your Caspio DataPages.    To view all the styles in your Caspio Style,  you can first create a duplicate of your default style and click edit.  Inside your duplicate style, click the "Source" tab then select "All" under DataPage Elements.  You will see the CSS style codes for all classes in your Caspio DataPage.   You can modify the style codes and apply them to your DataPages.


  2. Just want to share this solution to redirect the Submission DataPage after showing  the Display Message.


    Insert this code as source text in the Display Message html.  You can change the delay by increasing  or decreasing the number. 


    setTimeout(function () {
           window.location.href = "https://www.google.com"; 
        }, 2000); 





  3. Hey,

    I was searching for a solution to pass browser parameter into another html page inside an iframe and I stumbled on a neat code and tweaked it.   It worked for me so I'm sharing this here.

                <iframe src="ParamCatch.html" width="100%" height="500" type="text/html" frameborder="0"  style="border: 0">
            <script type="text/javascript">
            var form = 'ParamCatch.html';
            var params = window.location.search;
            var thisScript = document.scripts[document.scripts.length - 1];
            var iframe = document.createElement('iframe');

            iframe.setAttribute('src', form + params);
            iframe.setAttribute('width', '100%');
            iframe.setAttribute('height', 500);
            iframe.setAttribute('type', 'text/html');
            iframe.setAttribute('frameborder', 0);
            iframe.setAttribute('allowTransparency', 'true');
            iframe.style.border = '0';

            thisScript.parentElement.replaceChild(iframe, thisScript);


    My Test:
    - Two HTML pages, Main.html and ParamCatch.html

    ParamCatch.html contains the embedded DataPage set to receive parameter as filter for Tabular Report

      > contains the script above
      > tested using Main.html?paramname=paramvalue
      > ParamCatch.html got the parameters and displayed the correct data



  4. Sharing this in case you need to show the text instead of ID value in report datapage. 


    1) Make sure you have a table that has your lookup values
    2) Add a Calculated Field in your Tabular Report DataPage and insert the code below

    SELECT LookUpTableDisplayText FROM LookUpTable  where LookUpTableIDvalue='[@field:IDFieldInDataPage]'


    3)  If you want to hide the ID column, you can use the steps below.


  5. Sharing my solution for adding an image to your Submission Form email notification.


    For this to work, you need 2 deployed DataPages, 1 Submission Form and 1 Report DataPage both using the same table containing the image path as DataSource.  Copy the code below inside the message body of your email notification and don't forget to click "Source" before inserting the code.


    <img src="[@cbBridgeServer!]/dpImages.aspx?appkey=InsertYourDeployedReportDatapageAppkeyHere&amp;file=[@field:YourImageFieldName]" />





  6. Hi ohsusan429,


    I don't think it's possible to add your 4th criteria in this same report because it sounds more like you're looking to implement an "IF > Else" conditional statement as oppose to just telling the Filter which records to include or to disregard.  If I understand you correctly, you want the criteria to give you this logic >> ("IF CruiseLine.Criteria4 Contains Viking THEN SailDate.NextXDays.=60, ELSE SailDate.NextXDays=14").  I don't believe the Report Filter logic will allow you to do this.  

    What is possible though is to have a submission form with virtual fields then insert a footer javascript that will monitor the value of the criteria fields and will redirect the user to the correct report DataPage based on the chosen criteria.  So if they selected Viking, the submission form will direct the user to your Report DataPage where SailDate.NextDays=60 and CruiseLine.Criteria.Contains.Vikings.  Hope this helps.

  7. Hi hrdickinson,


    You need to check the exact id name assigned to the Client_ID field.  In the Search form of a Report Datapage, a field can be assigned with id like
    "Value3_1".  Do you have a sample Datapage?

    Try this:


    function setSearch(){

         if("[@authfield:Level#]" == 3){





    document.getElementById("searchID").onmouseover = setSearch;



  8. Hi EDG28,


    Try this:

    Get two virtual fields in your submit form then add the script in your footer.


    <SCRIPT LANGUAGE="JavaScript">
    function dateLastYear(){
    var currentDate= new Date();

    var MonthNow = currentDate.getMonth();
    var DayNow = currentDate.getDate();
    var YearNow = currentDate.getFullYear();

    var currentYear = currentDate.getFullYear();
    var previousYear = currentYear - 1;
    document.getElementById('cbParamVirtual1').value = (MonthNow+1) + "/" + DayNow + "/" + YearNow;

    document.getElementById('cbParamVirtual2').value =  (MonthNow+1) + "/" + DayNow + "/" + previousYear;



  9. Hi VLE33,

    Just wondering why you would use a Submission Form for search?  Are you trying to implement something like this? > http://howto.caspio.com/tech-tips-and-articles/tech-parameters/add-a-search-interface-to-results-sets-page/.

    If you are, you can use two virtual fields from your Submit Form as start and end value that you can pass as parameter for your Report DataPage.  You can enable New criteria to add Criteria 1 and Criteria 2 for your Search Field Filter.  Make sure you assign the matching parameter names for your Submit and Report DataPage.






  10. On 3/27/2017 at 0:02 AM, Pulford said:

    How would I amend the code to do the following on a virtual field radio box, submission page. My virtual field is named Virtual3.


    If choice 1 is selected, hide submission button. 

    If 2 is selected, show submission button. 

    If 3 is selected, show submission button. 

    If 4 is selected, hide button. 


    Here is what I have so far...but it's not working


    document.getElementById("InsertRecordcbParamVirtual3_0").checked = true;
    document.getElementById("InsertRecordcbParamVirtual3_3").checked = true;
    document.getElementById("Submit").style.display = "none"; 
    document.getElementById("Submit").style.display = "visible"; 




    See if this helps..


    function HideButton(){
    if (document.getElementById("cbParamVirtual10").checked)
     document.getElementById("Submit").style.display = 'initial'; 

    else if (document.getElementById("cbParamVirtual11").checked)
     document.getElementById("Submit").style.display = 'none'; 

    else if (document.getElementById("cbParamVirtual12").checked)
     document.getElementById("Submit").style.display = 'none'; 

    else if (document.getElementById("cbParamVirtual13").checked)
     document.getElementById("Submit").style.display = 'initial'; 

    document.getElementById("Submit").style.display = "visible"; 

    document.getElementById('caspioform').onmousemove = HideButton;


    ** cbParamVirtual10 to cbParamVirtual13 represents the id's of each radio button for Virtual1.  Run inspect to see the exact ID assigned to your radio buttons.

  • Create New...