Jump to content

Vitalikssssss

Caspio Evangelist
  • Content Count

    522
  • Joined

  • Last visited

  • Days Won

    52

Posts posted by Vitalikssssss

  1. Hi @JSLane,

    It is doable in Caspio.

    You should use separate form (Submission Form Datapage) which passes a parameter to the Report Datapage.

    The trick here is that you will have multiple fields in report datapage which receive a single parameter.

    This concept described in the following article:

    https://howto.caspio.com/faq/reports-datapages/how-to-do-keyword-search-across-multiple-fields/

    I would also suggest watching the following tutorial video which explains how to pass parameters between separate form embedded on single web-page.

    https://www.youtube.com/watch?v=K3CKFjuSIt4

    Hope this helps.

    Regards,

    vitalikssssss

     

  2. Hi @DTINVN,

    I am afraid that you cannot use SQL in HTML blocks.

    SQL code can be only used in Calculated values\fields.

    I would recommend using a JS code in order to achieve described behavior.

    1. Add the following code into HTML block:

    <p id="[@cbRecordIndex#]"></p>

    2. Add the following JS into Datapage Footer:

    <script type="text/javascript">
    document.addEventListener('DataPageReady', function (event) {
    
    let el = document.querySelectorAll('td>p');
    let par = '[@BU]';
    
    el.forEach(element => {
        if(par=='8') element.innerHTML = '<span month_year="[@field:Month_Year*]" sub_type="[@field:Function_Subtype#]">[@field:MPBU_HC]</span>';
        else if (par=='6') element.innerHTML = '<span month_year="[@field:Month_Year*]" sub_type="[@field:Function_Subtype#]">[@field:MicBU_HC]</span>';
        else element.innerHTML = '0';
    });
           
    });
    </script>

    Please make sure that you disable HTML editor before inserting the code.

    Regards,

    vitalikssssss

  3. Hi @guardmetrics,

    Formula field performs calculation within a record and it cannot be used for cross table calculation.

    You should consider using Calculated fields on Report/Details datapages with SQL in order to perform cross-table calculation.

    Here is an article which explains how to use SQL in Calculated fields:

    https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

    You may use Task/Triggered action feature if you would like to store value of cross-table calculation on table level.

    Here is an article:

    https://howto.caspio.com/tables-and-views/triggered-actions/

    Hope this helps.

    Regards,

    vitalikssssss

  4. @kpcollier,

    You can use the following JS code if you decide to use a custom code.

    <script type="text/javascript">
    
    function calculate() {
    
        var subTotal = isNaN(parseFloat(document.getElementById("InsertRecordSubtotal").value)) ? 0 : parseFloat(document.getElementById("InsertRecordSubtotal").value);
        var markUp = isNaN(parseFloat(document.getElementById("InsertRecordMarkUp").value)) ? 0 : parseFloat(document.getElementById("InsertRecordMarkUp").value) ;
        var countyTax = isNaN(parseFloat(document.getElementById("InsertRecordCounty_Tax").value)) ? 0 : parseFloat(document.getElementById("InsertRecordCounty_Tax").value);
        var miscPerc = isNaN(parseFloat(document.getElementById("InsertRecordMisc_Percent").value)) ? 0 : parseFloat(document.getElementById("InsertRecordMisc_Percent").value);
        var freight = isNaN(parseFloat(document.getElementById("InsertRecordFreight_Total").value)) ? 0 : parseFloat(document.getElementById("InsertRecordFreight_Total").value);
    
    
        var markUpTotal = document.getElementById("InsertRecordMarkUp_Total").value = (subTotal) * (markUp);
    
        var countyTaxTotal = document.getElementById("InsertRecordCountyTax_Total").value = (subTotal) * (countyTax);
    
        var miscPercTotal = document.getElementById("InsertRecordMisc_Percent_Total").value = (subTotal) * (miscPerc);
    
        document.getElementById("cbParamVirtual1").value = (subTotal) + (markUpTotal) + (countyTaxTotal) + (miscPercTotal) + (freight);
     
     }
     
    setInterval(calculate, 1500);
    
    </script>

    Regards,

    vitalikssssss

  5. Hi @BFuchs

    9 hours ago, BFuchs said:

    So if there is no record yet, user will have to click twice, first on the link to open update DP and then on the link to open Submission DP?

    No, user will be routed automatically to the Submission Form.

    9 hours ago, BFuchs said:

    In addition of trying to use the least datapages possible.

    User does not have to click second time.

    9 hours ago, BFuchs said:

    My goal here is to have the user click it only once

    I doubt that it will be possible. You may customize Tabular report with inline insert, however it will require some sophisticated JS code to cover all possible scenarios.

    Regards,

    vitalikssssss

  6. On 12/19/2019 at 2:54 PM, roattw said:

    Very helpful.  May, What does your data entry page look like?  How can you set a time field (Date/time) where people only enter the time (ie the time they started or ended)?  Without getting a dateor using a calendar popup?

    This might help: https://howto.caspio.com/tech-tips-and-articles/common-customizations/separate-input-fields-for-datetime-parts/

    Regards,

    vitalikssssss

  7. Hi @AmyBelote,

    You are right, List_string datatype is not supported in advanced features like Calculated field, Triggered action or Tasks.

    There is a feature request in Caspio IdeaBox:  Link

    As a workaround, you may export/import your table with List - String field as into Text(255) field in order to have a string with comma delimited values. 

    Hope this helps.

    Regards,

    vitalikssssss

     

  8. 10 hours ago, Elderberg said:

    Hey Vitalikssssss,

    I implemented your suggestion using a Dropdown box.  Previously I had a VirtualField configured as a TextField with calendar pop up enabled. 

    Below are two lines of code which i used previously when the field was a TextField.  Can you advise how I would 1.) assign v_DateOnlyStamp as a value to the dropbox  2.) pass the selected value of the dropbox to a variable.  

    // Assign Current Date 
    document.getElementById('cbParamVirtual1').value=v_DateOnlyStamp;

    //  pass value to variable
    var date = document.getElementById('cbParamVirtual1').value;

    What is the purpose of this script? 

    Sorry, it does not make any sense to me.

    Regards,

    vitalikssssss

  9. 14 hours ago, geoffdude said:

    Is "Loops" even available for tasks anymore? I don't see it.

    Hi @geoffdude,

    It is available in 20.0 Caspio Bridge version.

    Probably your site has not been updated yet to 20.0 Caspio Bridge version.

    You can check your Caspio Bridge version within your account: from the top menu bar HELP --> About Caspio Bridge.

    Also, you can check Caspio Twitter for latest information about system updates.

    Regards,

    vitalikssssss

  10. Hi @Ed727,

    I assume that you have both Datapages deployed on a web-page with an embed method.

    You can use a JS which clicks on Submit button if my assumption is correct.

    Here a a code which you can use on web-page:

    <script>
    
    function submit () {
    
    document.querySelector("input[id*='Submit']").click();
    
    }    
        
    setTimeout(submit, 5000); 
        
    </script>

    Hope this helps.

    Regards,

    vitalikssssss

  11. Hi @Johnn,

    Yes, it is possible with CSS.

    Here is an example of CSS code. It should go into Datapage Header and also make sure that you disable HTML editor

    <style>
    
    input#InsertRecordYOUR_FIELD_NAME {
        background: #008000;
    }
    
    input#InsertRecordYOUR_FIELD_NAME {
        background: #00bfff;
    }
    
    </style>

    Replace "YOUR_FIELD_NAME" with your actual fields name and change the color according to your preferences.

    You can use this color picker.

    Hope this helps.

    Regards,

    vitalikssssss

×
×
  • Create New...