Jump to content

George43

Caspio Ninja
  • Posts

    37
  • Joined

  • Last visited

  • Days Won

    4

Reputation Activity

  1. Thanks
    George43 got a reaction from bbeshlian in Parse a Comma Separated Field   
    Sometime ago a used this kind of formula to parse large amounts of users FullName info
    First Name:
    IsNull(Left([@field:FullName],(Patindex('%,%', [@field:FullName])-1)),' ') Last Name: 
    IsNull(Right([@field:FullName],( Len([@field:FullName])-Patindex('%,%', [@field:FullName]))),' ') Formula for Parsing Values formCollumn: FullName
  2. Like
    George43 got a reaction from rrushton in Redirect Based on ID in Tabular Report(s)   
    Hi there I prepared an example. You can change and add conditions and URL. But logic should work if you will have difficulties just ask me. Href should be changed because they are equal now.
     
    <button type="button" id="button[@field:id#]">Click me</button> <script type="text/javascript"> //add field ID with autonmber to your report document.addEventListener('DataPageReady', function (event) { document.getElementById('button[@field:id#]').addEventListener('click',()=>{ //comparing x to y redirection if(+'[@field:SHIP_ID]'==53){ //window.location.href = 'page x url'; //add url links }else{ //window.location.href = 'page y url'; //add url links } //comparing Tour Site switch (+'[@field:TOUR_SITE_ID]') { case 1: case 2: case 3: //you can add case before case 8 case 4: case 6: case 8: window.location.href = "https://www.myapp.com/system/food-plan/?RECORD_ID=[@field:RECORD_ID]"; //url links customization break; case 5://you can add case before case 7 case 7: window.location.href="https://www.myapp.com/system/food-grid/?RECORD_ID=[@field:RECORD_ID]"; break; default: console.log('error'); break; ///etc you can edit cases and so on. } }); }); </script>  
  3. Thanks
    George43 got a reaction from Vitalikssssss in Dropdown customization   
    You should Add Event Listener on that particular Input and apply style to all child Nodes
    <script type="text/javascript"> document.addEventListener('DataPageReady', function(event) { document.querySelectorAll("[name~='InlineAddemail']")[0].addEventListener('click', function(){ if(document.querySelectorAll('.Ctnr')[0]){ document.getElementsByClassName('DropBox')[0].style.setProperty('width', '350px'); document.querySelectorAll('.Option').forEach(function(elem){ elem.style.setProperty('border-bottom', '1px solid black'); elem.style.fontFamily = 'Lucida Console'; }); } }); }); </script> InlineAddemail is your Input name attribute. You can find it via chrome developer console.
     
  4. Thanks
    George43 got a reaction from bbeshlian in Search Date Range Across Multiple Fields   
    You should create Submission form with 2 virtual parameters and pass them on the report with pre-defined criteria
    After that, You should receive this Params in the report data page and go to the Each element and create 2 criteria for each column.
    1) Make sure that main criteria is OR between column. 
    2) On each section for the (Field=>Start  and Field <=End) .
    Example:
    (Field=>Start  and Field <=End) (Column 1)
    or
    (Field=>Start  and Field <=End) (Column 2)
    or
    (Field=>Start  and Field <=End) (Column 3)
    or
    ....
     
    P.S There is Application Example.
    Installment_Range_1_0_2019-Mar-13_1153.zip
  5. Confused
    George43 got a reaction from Vilho in Data page loading issue?   
    I recommend you to use JetPack CDN instead of other cache services. 
  6. Like
    George43 got a reaction from Medron in Collecting 2 signatures   
    This code is updated due to event Changes after implementation of Ajax and some changes. This method will work same On Submission Data Page and on the Details Data Page without any code changing
    Header Code
    <!-- Header code --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script src="./jquery.signaturepad.min.js"></script> <div id="cb_sign_wrapper_edit"> <!-- Header code end --> First Signature code
    <!-- HTML Block code after hidden field with label Signature (type 64000) and virtual hidden field (CB_Virtual1)--> <div class="sigPad"> <div class="sig sigWrapper"> <canvas class="pad" width="218" height="55" style="margin: 0px 0px 0px 100px; border-style: solid; border-width: 1px; border-color: #bbbbbb #dbdfe6 #e3e9ef #e2e3ea; -webkit-border-radius: 1px; -moz-border-radius: 1px; -o-border-radius: 1px; border-radius: 1px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background-color: #FFFFFF;"></canvas></br> <span style="margin: 0px 0px 0px 264px;"> <input type="reset" class="clearButton" value="Clear"> </span> <input type="hidden" name="output" class="output"> </div> </div> <!-- html block end --> Second Signature code
    <!-- HTML Block code right after hidden field with label Sales_Signature (type 64000) and virtual hidden field2 (CB_Virtual2) --> <div class="sigPad"> <div class="sig sigWrapper"> <canvas class="pad" width="218" height="55" style="margin: 0px 0px 0px 100px; border-style: solid; border-width: 1px; border-color: #bbbbbb #dbdfe6 #e3e9ef #e2e3ea; -webkit-border-radius: 1px; -moz-border-radius: 1px; -o-border-radius: 1px; border-radius: 1px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background-color: #FFFFFF;"></canvas></br> <span style="margin: 0px 0px 0px 264px;"> <input type="reset" class="clearButton" value="Clear"> </span> <input type="hidden" name="output" class="output"> </div> </div> <!-- html block end --> Footer Code
    <!-- Footer code In order to work propertly Fields names: Signature/Sales_Signature After each should be html block--> <script type="text/javascript"> $(document).ready( function () { // TODO: Add your signature fields here in the order they appear on the form --> var signatureFields = [ ['Signature', [@field:Signature!], 'cbParamVirtual1'], ['Sales_Signature', [@field:Sales_Signature!], 'cbParamVirtual2'], ]; for (var i = 0; i < signatureFields.length; i++) { var api = $($('#cb_sign_wrapper_edit .sigPad')[i]).signaturePad({ drawOnly: true }); if (api) { api.regenerate(signatureFields[i][1]); } } document.addEventListener('BeforeFormSubmit', function(event) { for (var i = 0; i < signatureFields.length; i++) { // Dump signature JSON data into hidden signature field var newSignature = $('#cb_sign_wrapper_edit .output')[i].value; if( $('#EditRecord' + signatureFields[i][0])[0]){ $('#EditRecord' + signatureFields[i][0])[0].value = newSignature; } if( $('#InsertRecord' + signatureFields[i][0])[0]){ $('#InsertRecord' + signatureFields[i][0])[0].value = newSignature; } // Capture each signature image into its corresponding [hidden] VIRTUAL field var api = $($('#cb_sign_wrapper_edit .sigPad')[i]).signaturePad({ drawOnly: true }); if (api) { api.regenerate(newSignature); $('#' + signatureFields[i][2]).val(api.getSignatureImage()); } } }); } ); </script> </div> <!-- Footer code end --> This code requires  jQuery signature library file in the root of the page on your hosting.
     
     
    File with Library and Example of the app is attached below. 
    jquery.signaturepad.min.js
     
    Multiple_Signatures_1_0_2019-Feb-14_1224.zip
×
×
  • Create New...