Jump to content

Vitalikssssss

Caspio Rockstar
  • Content Count

    494
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by Vitalikssssss


  1. @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


  2. 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


  3. 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


  4. 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

     


  5. 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


  6. 10 hours ago, Elderberg said:

    I realize the Task creates the dates as a Date Object..  i think i need it to be saved as a String.  I was unsuccessful in my attempt to modify your Task.  Can you advise if this is possible? 

    Hi @Elderberg,

    I am not sure why you need Date to be saved as String, but anyway you can simple change the datatype for the field "Date".

    Regards,

    vitalikssssss

     


  7. 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


  8. 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


  9. 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


  10. Hi @Elderberg,

    I can suggest using a simple Dropdown or Listbox for date selection and a lookup table which will be updated via Tasks on daily basis.

    Here is an example of Task which adds yesterdays, current date, and tomorrows date on daily basis.

    qQwNWlw.png

    You may also import this Task from attached archive.

    Hope this helps.

    Regards,

    vitalikssssss

    CaspioData_2019-Dec-02_1638.zip


  11. Hi @RickManolo,

    Well, for me the easiest way to do this is to use a Virtual field to display "Notes" and make an actual field "Notes" as hidden.

    I assume that you use Single Record Update or Details Datapage. 

    If the answer for above is yes, you can use the following JS code to concat existing Note with AddNote input after Update of the record.

    <script type="text/javascript">
    document.addEventListener('BeforeFormSubmit', function (event) {
    
            let target = document.querySelector('[id*="EditRecordNotes"]');
            let n_notes = document.querySelector('input[id*="EditRecordAdd_Note"]').value;
            let o_notes = document.querySelector('input[name*="cbParamVirtual1"]').value;
    
            target.value = o_notes + n_notes;
    
    });
    </script>

    Change the name of the fields if necessary, and also make sure you disable HTML editor prior to pasting the code.

    Hope this helps.

    Regards,

    vitalikssssss 

     

     

×
×
  • Create New...