Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 07/29/2021 in all areas

  1. TellMeWhy

    Conditional Formatting

    Nothing else. Better put it in the footer, though, as that's more recommended when using scripts (so, it's the last one loaded when a page loads).
    1 point
  2. TellMeWhy

    Calculated Field Date

    Here's the conversion codes You can also try changing the formatting, should definitely be doable there, however, it's just for display, value would still be the same.,
    1 point
  3. Meekeee

    Use Range in Date Field

    Hi @Catra - you can try this one: CASE WHEN [@field:DATE_FIELD] >= CONVERT(datetime, 'mm/dd/yyy', 101) AND [@field:DATE_FIELD] <= CONVERT(datetime, 'mm/dd/yyy', 101) THEN 'TRUE' ELSE 'FALSE' END For more information, you may check this article: https://howto.caspio.com/function-reference/
    1 point
  4. Alternatively, you can use the following: <style> .cbSearchButtonContainer{ grid-row: 1 !important; grid-column: 5 / span 4 !important; padding-top:30px !important; } </style> row depends on what row you want to put it to. Column depends on the position on the specific row, just play with it, keep the span to 4 padding is just to adjust the specific position in the column and row Sample:
    1 point
  5. What's your goal here? I have the following : <script> document.addEventListener("DataPageReady", function arrays(){ var arr = [1,2,3,4]; var arrblnk=[]; var val = 2; var position = arr.indexOf(val); for (i=0; i <= position; i++){ arrblnk.push(arr[i]); } }); </script> the array - arr A blank array - arrblnk the value in the array - val position of that value in the array - position for loop will go through each value until the position, and then 'push' insert the values in the blank array up until the said value
    1 point
  6. Hi @Cherry - You can try to use margin-left on this. I created a sample just like yours and this is the result: Before: After: What I did on this is that I find the HTML Container using the browser's inspect and add the CSS in the Header of the DataPage: You can copy the code and just change the class based where your HTML Block is placed in your DataPage. <style> div[class*="cbFormData cbFormBlock5"] { margin-left: -35px !important; } </style> I hope this helps!
    1 point
  7. On top of this, make sure to disable the HTML editor on the advanced tab before pasting the code. Here's a HowTo article for more information: https://howto.caspio.com/faq/web-forms/how-to-disable-html-editor-in-datapage-headerfooter-and-html-blocks/
    1 point
  8. Hi @Cherry, you may insert an HTML block to your elements and enable the 'Continue next element on the same line' on the "last name" field, then insert the code below on your HTML block <style> .cbSearchButtonContainer { display: none !important; } </style> <input class="cbSearchButton" id="searchID" name="searchID" style="margin-top: -10px" type="submit" value="Search" /> You may adjust the value of the margin-top depending on your preference. -Potato
    1 point
  9. Hi @HexGone! If you can use triggered actions on your account, you can achieve that using a similar triggered action as this: This triggered action will run on an update event(when you update the status), and then check the updated value of the field "type" (in your case, "Status"). Based on the updated value of "type", the trigger will change the email body to the corresponding CASE WHEN statement that it matches and then send it to the email address included in the updated record. I hope this helps. - Tubsss
    1 point
  10. 1.) Create Calculated Field: STUFF((SELECT TOP 1 ', ' + (COLUMNAME1)+', '+ (COLUMNNAME2) FROM TABLENAME ORDER BY COLUMNNAMEOFDATE DESC FOR XML PATH ('')), 1, 1, '') This will get one record that has the latest DATE according to DATE column. If you want to append more columns, just add like +','+(COLUMNNAME3). If the column is not Text(255) DataType, use Convert (+','+ CONVERT(VARCHAR, COLUMNNAME3)) 2.) Create this div in Header, same ID, Disable Advanced HTML Editor 3.) FOOTER SCRIPT: <script> var x = document.querySelector("table[id^='cbTable_']").rows[1].cells[1].innerHTML; var container = document.getElementById("customer-info"); container.innerHTML=x; </script> This just gets 2nd row, and 2nd column of the table (HEADER included), my Calculated Field is the 2nd field in my DataPage Settings that's why I use cells[1], you may change depending on the position of the Calculated Field, counting starts from 0 Hide Column in Tabular Report to Hide Calculated Field:
    1 point
  11. Talbot

    Email PDF

    Hi Jay: We do this quite a lot. For example, in one case we need to create a PDF Work Order and email to the fulfillment company, for each order that is ready to go. The fulfillment company does not have an API Set, so we need to email the PDFs. Once a day, we look at all the orders in Caspio flagged as "Ready", then we build a fairly graphically-rich Order PDF for each Order and email the Order PDF - one email per Order. We run daily task in AWS, and pick up the Order Details using Caspio APIs. Then we email using AWS Simple Email System. The AWS cost is trivial. You must have a Grow Account to get the Caspio API capability. We are happy to share the code David Talbot
    1 point
  12. Just leaving this here ... <script> document.addEventListener('DataPageReady', function(event) { function hideControlsForPerson() { var table = typeof document.getElementsByClassName("cbResultSetTable" + event.detail.uniqueSuffix)[0] == "undefined" ? document.getElementsByClassName("cbResultSetTable")[0] : document.getElementsByClassName("cbResultSetTable" + event.detail.uniqueSuffix)[0]; // Find the index of the last column, which happens to be the inline edit/delete var total_num_columns = table.rows[0].cells.length; var controlsColumnIndex = total_num_columns - 1; //position of the column with inline edit/delete // Find the index position of the column by searching the column's label row = table.rows[0]; var i; var KeyColumnIndex; for (i = 0; i < total_num_columns; i++) { if (row.cells[i].textContent == 'Label_of_Target_Field') { KeyColumnIndex = i; i = total_num_columns; // this is essentially to exit the loop } } // Iterating through rows and hiding Content for (var i = 1, row; row = table.rows[i]; i++) { if (row.cells.length > KeyColumnIndex && row.cells[KeyColumnIndex].textContent !== '[@authfield:Name]') { row.cells[controlsColumnIndex].style = "display:none;" } } } hideControlsForPerson( ); }); </script> Note: " row.cells.length > KeyColumnIndex " was added to the if statement to protect against an uncaught TypeError that happens if using a date rollup or other field grouping.
    1 point
×
×
  • Create New...