Jump to content

Leaderboard

Popular Content

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

  1. Hello @DDLiving, You may refer to this screenshot to achieve that.
    3 points
  2. LittleMsGinger

    Combined Views

    Hi @Joemac, just to verify, you would like to use two views as the Data Source of one DataPage? If that is correct, unfortunately, it s not possible. You can only select one Table or View as a Data Source. You can just combine the Tables to create one View and use it in the DataPage. Hope this helps!
    2 points
  3. You can also use F12 > click on the cursor thingy > click on the element that you want to change the style and you should be able to see what class it belongs to Go to Styles > Source > All, press ctrl + f and input the class there
    2 points
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. Hi! Just to add on this, I have found a documentation containing the list of URL encoded characters that you can use as a reference: URL Encoded Characters (degraeve.com)
    1 point
  13. waltmayo

    Hired help...

    I am in need of some help with integrating Javascript into some of my apps. I know that the Caspio team will take on custom programming jobs, but these tasks are sometimes very small. Does anyone else out there do freelance Caspio work? I'm not opposed to hiring Caspio's programmers, just was interested in learning all my options. Walt
    1 point
  14. TellMeWhy

    No Style Sheet

    Remove all code here
    1 point
  15. Meekeee

    Embed Document

    Hi @Catra- you can embed documents in DataPages, see this article: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/tech-tip-embed-documents-in-datapages/ For Dropbox, follow this workaround: 1. Change the code with this: <object style="width:718px; height:700px;" frameborder="0" data="[@field:Attachment]" type="application/pdf"> <embed src="[@field:Attachment]" type="application/pdf" /> </object> You can freely change the height and width. 2. Replace the end of the URL with 'raw=1'. Here's an example: From: https://www.dropbox.com/Link.pdf?dl=0 Change it to: https://www.dropbox.com/Link.pdf?raw=1 Then Disable AJAX of the DataPage - to disable, check this article: https://howto.caspio.com/datapages/ajax-loading/
    1 point
  16. Tubby

    Formula Field on Table

    Hi @Joemac, You may also want to check this HowTo Article about Function Reference for other helpful formulas: https://howto.caspio.com/function-reference/ I hope it helps. ~Tubsss
    1 point
  17. seems like you're missing var elems = isi.parentNode.parentNode.querySelectorAll("td"); it's set just above the for loop
    1 point
  18. NiceDuck

    12-hr Format

    Case when DatePart(hour,[@field: date]) > 12 then DateAdd(hour, -12, [@field:date]) + ' PM' else [@field:date] + ' AM' end its a lot longer than what you have but oh well...
    1 point
  19. that helps a lot. let me see how that works
    1 point
  20. Meekeee

    12-hr Format

    Your formula is great! Thanks for sharing. Hmm, you can try JavaScript in the DataPage as well? https://stackoverflow.com/questions/13898423/javascript-convert-24-hour-time-of-day-string-to-12-hour-time-with-am-pm-and-no https://www.geeksforgeeks.org/convert-time-from-24-hour-clock-to-12-hour-clock-format/
    1 point
  21. Hello! I just wanted to share that we can add certain days in a calculated field or formula. You can try this formula: DateAdd(day, 30, [@field:date]) Then, it will now indicate the number of days that you inserted inside your formula. As you can see on my end, this is what it looks like: The Date add is the calculated field. The date from 6/1/2021 adds 30 days that is why it displays the 7/01/2021 date. I hope this helps! cheers!
    1 point
  22. 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
  23. Hi @scribblemilk, you might want to try this workaround that I discover. First, create a Tabular DataPage and choose your data source. Filter the report using your Date field and set the comparison type to 'Before Now'. Then, choose the fields for your Results page and paste this script to your Footer. This script will automatically redirect you to details page where you can edit the last submitted record. <script> var bulkEditSubmit = document.querySelector('.cbResultSetActionsLinks[data-cb-name=DetailsLink]'); console.log(bulkEditSubmit); setTimeout( () => { bulkEditSubmit.click(); }); </script> Choose your Date field and sort it in descending order. Set the records per page into 1 only. Lastly, enable the Details page and configure the fields you want to be editable. Also, you have the option to disable the navigation to the next or previous records. Here is a sample DataPage I made: https://c0hcv332.caspio.com/dp/3b43900055adaba2de354b22ad43 I hope this helps!
    1 point
  24. Hi @Flowers4Algernon, That's a nice workaround! I just want to share that if you are going to use a lookup table instead of the custom values, you can enter another field in your table with no values and use it for display and it will also hide the labels. -Natoy
    1 point
  25. Hi there! Just to add, you may also want to check these link for your reference: https://howto.caspio.com/datapages/responsive-datapages/modifying-styles-for-tablet-and-mobile/ https://howto.caspio.com/datapages/responsive-datapages/responsive-behavior-on-tablet-and-mobile/
    1 point
  26. Hi @DDLiving, You can search for elements with “_mobile” attached to them in Styles to customize the HTML elements when in mobile mode. For most of the elements there are CSS classes with the “_mobile” or “_tablet” suffix, which contain the current settings for tablet and mobile screens: “_mobile” refers to screen width 320px – 567px “_tablet” refers to screen width 568px – 1024px I hope this helps.
    1 point
  27. It's pretty easy, just add ELSE on the code and use auto submit <script type="text/javascript"> document.addEventListener("DataPageReady", function tester(){ if(document.getElementById("errormessage")){ window.location.href = "https://www.google.com"; } else{ setTimeout('document.forms["caspioform"].submit()',1000); } }); </script> In my code I removed the display none, but, you can include that since you wouldn't want your users to be seeing that anyway, you can also reduce the 1000 delay to a faster one, but I think that's fast enough and if you have display none, it will be alright.
    1 point
  28. Yeah, you actually can, but, I found that it's better to create your own element with a unique ID so you can reference the ID instead of the class I have then added an HTML Block in the authentication fields, and NOT the footer because footer and header code gets removed when the Failure Message appears, apparently. <script type="text/javascript"> document.addEventListener("DataPageReady", function tester(){ if(document.getElementById("errormessage")){ window.location.href = "https://www.google.com"; } }); </script>
    1 point
  29. Hi @pmcfarlain - you may try this forum post This is the result I had My code in HTML Block <div id="visi-[@field:GUID]"></div> <script> var isi = document.getElementById("visi-[@field:GUID]"); if([@calcfield:1#] < 0 ){ isi.parentNode.parentNode.classList.add('custom-less') } else{ isi.parentNode.parentNode.classList.add('custom-greater'); } </script> Header <style> [class*="custom-"] * { color: inherit !important; } .custom-less { color: red; background-color: yellow !important; } .custom-greater{ color: black; background-color: transparent !important; } </style> I hope this helps!
    1 point
  30. Meekeee

    Matrix Table

    Hi @Veretta, If this is from an Excel, you can copy and paste the table in HTML Block, just like this one: The table will be plain and without borders, you can re-configure it inside the HTML editor. For more information about HTML Editor, see this reference: https://howto.caspio.com/datapages/datapage-components/html-blocks/ I hope this helps.
    1 point
  31. NailDyanC

    Separate numbers

    Hi, just to update this post. It seems that the function that you will need is "Right(string,length)"since you will be getting the last number from the right which is 5. You may consider this workaround: Right((CONVERT(VARCHAR, ([@field: Fieldname]))),1) Just change the field name based on the calculated field that you are using.
    1 point
  32. It is stated under this documentation under the 'Pre-requisites' https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-create-a-one-to-many-relational-datapage/
    1 point
  33. I guess it is because of the related field set as unique. They should not be unique so you can enable the referential integrity.
    1 point
  34. Ah, it's Calendar, so it should work the same as this https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-dynamically-change-the-background-of-a-results-page/ You need to use a unique field for the ID, just append different text for different elements Here's an example:
    1 point
  35. Joemac

    Triggered Actions

    @Tubby So appreciate you doing this for me! I think I can follow this and set it up.
    1 point
  36. TellMeWhy

    Stacked Area Chart Colors

    Try JS instead, <script type = "text/javascript" > var timer = setInterval(function() { //Find if chart exists using rect element every x milliseconds if (document.getElementsByTagName('rect') != null) { //Update Chart UpdateChart(); } }, 500); function UpdateChart() { try { Highcharts.charts[0].update({ //CHANGES HERE series: [ {color:'red'}, {color:'blue'}, {color:'yellow'} ] //CHANGES END HERE }); //Stop checking clearInterval(timer); } catch (err) { //log errors } }; </script> basically makes the first one red, then blue, then yellow No script: With the script
    1 point
  37. autonumber

    Download All Files

    Hi! On you Caspio bridge you can go to Tools > Export > Custom Export > then Select all the files that you would like to download. You can refer to these links: https://howto.caspio.com/faq/import-and-export/can-i-exportdownload-all-my-files-in-one-batch/ https://howto.caspio.com/files-and-images/bulk-file-import-and-export/
    1 point
  38. Hi there you can configure it on styles of your Caspio bridge and change for your desired color!
    1 point
  39. Hello! This comment is similar to your inquiry and might help you I guess.
    1 point
  40. 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
  41. GoodBoy

    parameter scope

    You may add cbResetParam=1 at the end of your URL.
    1 point
  42. GoodBoy

    capture user role at login

    Hi, This is a sample configuration to achieve that in a Results page. Same process can be applied to Details page as well.
    1 point
  43. One more thing, I also checked the 'Read Data' for the data source (table or view) I am using for my DataPage.
    1 point
  44. I also experienced this issue a last month. What I did is that I also allow or checked the 'Read App' for the application where my DataPage belongs and it is now permitting my external users to access the DataPage.
    1 point
  45. Not sure if what I understood is correct, but, you can try this, create a Calculated Value, this is to check if the date today is less than 5 or not. If it's 1, user can input any date, if it's 0, only on the current month and later. CASE WHEN DATEPART(day, GetUTCDate()) <5 OR (DATEPART(day, GetUTCDate()) >= 5 AND DATEPART(month,GetUTCDate()) <= DATEPART(month, [@field:Date])) THEN 1 ELSE 0 END Script on the footer: (change the number on cbParamVirtual1 depending in your Virtual Field) <script> document.addEventListener("BeforeFormSubmit", function(e){ var a= document.querySelector("input[name='cbParamVirtual1']").value; if (a == 0){ e.preventDefault(); alert("Please input Date within or after the current month"); } }); </script> If you want this to trigger on change of the field that is being used in the Calculated Field. Change the InsertRecordFIELDNAME to your actual field's id cbParamVirtual1 to your Virtual Field's name if it's 1 2 3 or whatevers <script> document.getElementById("InsertRecordFIELDNAME").addEventListener("change", function(e){ document.querySelector("input[name='cbParamVirtual1']").addEventListener("change", function checker(){ var a= document.querySelector("input[name='cbParamVirtual1']").value; if (a == 0){ //if Calculated Value is 0 then alert alert("Please input Date within or after the current month"); //add another code } this.removeEventListener("change",checker); }); }); </script>
    1 point
  46. Try this, this should work on both Monthly and weekly I added if else in the beginning part since the li.cbResultSetCalendarCaption > time only exists on the Month Variation, else, it would go Weekly Variation. Just change the URL at the last part with your proper URL <script> document.addEventListener('DataPageReady', function (event) { event.stopImmediatePropagation(); var month = ""; if(document.querySelector("li.cbResultSetCalendarCaption > time")){ var allSpanTags = document.querySelector("li.cbResultSetCalendarCaption > time"); month = allSpanTags.innerHTML; } else{ var allSpanTags = document.querySelector("li.cbResultSetCalendarCaption"); month1 = allSpanTags.innerHTML; var year = month1.substr(month1.length - 4); var month2 = month1.split(" ")[1]; var month = month2 + ' ' + year; console.log(year); console.log(month2); console.log(month); } month = month.replace(/January /gi,"1/Day/"); month = month.replace(/February /gi,"2/Day/"); month = month.replace(/March /gi,"3/Day/"); month = month.replace(/April /gi,"4/Day/"); month = month.replace(/May /gi,"5/Day/"); month = month.replace(/June /gi,"6/Day/"); month = month.replace(/July /gi,"7/Day/"); month = month.replace(/August /gi,"8/Day/"); month = month.replace(/September /gi,"9/Day/"); month = month.replace(/October /gi,"10/Day/"); month = month.replace(/November /gi,"11/Day/"); month = month.replace(/December /gi,"12/Day/"); var allHTMLTags = new Array(); //Create Array of All HTML Tags var allHTMLTags = document.getElementsByTagName("div"); //Loop through all tags using a for loop for (i=0; i<allHTMLTags.length; i++) { //Get all tags with the specified class name. if (allHTMLTags[i].className == "cbResultSetCalendarField") { var transfer = month.replace(/Day/gi,allHTMLTags[i].innerHTML); /*Begin Add New Link Section*/ allHTMLTags[i].innerHTML = allHTMLTags[i].innerHTML +'<br><a style="text-decoration:none;" href="URL?Date='+transfer+'">Add New</a>'; /*End of Add New Link Section*/ } } }); </script>
    1 point
  47. 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
  48. MayMusic

    First Day of the month

    You can change the form element of your field to be a Calculated Value on your submission page and use the formula below: DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
    1 point
  49. Barbie

    Date Range on my search form

    Hi, Here's a screenshot on how to achieve your workflow: Hope this helps.
    1 point
  50. @DefinitelyNot3133, thank you for comments. Regarding your comment #1, I do have the correct settings for that. And I do see the parameter being passed, because I display it in a HEADER section of the form just to verify that it passed. Regarding comment #2, I know that is my issue, but I don't know how to fix it. That is the reason I am using a left outer join, because I know I have a header record, but may not have a child record. I want to go to the new form to add the child record. If I filtered the view on the hdrid on a regular join, I would not get the header or the child because there would be no match in the child table.
    1 point
×
×
  • Create New...