Jump to content

pmcfarlain

Caspio Ninja
  • Posts

    89
  • Joined

  • Last visited

Everything posted by pmcfarlain

  1. I want to set the default search value for one of my Tabular reports to be today's date + 7 days. When I set the default value today, I usually tell it to receive [@cbTimestamp*] on load but I don't see how I would make it today + 7 days. Any ideas?
  2. I'd like to set a default record limit of 1000 (or 999 if that's the limit) when I have user selectable enabled. Right now, it defaults to 25 and only lets users select up to 250. How can I change this?
  3. <div id="visi[@field:lines_Line_Number]">[@field:dates_Customer_Expected_Date*]</div> <script> var isi = document.getElementById("visi[@field:lines_Line_Number]"); if('[@field:dates_Customer_Expected_Date*]' < '[@cbTimestamp*]'){ for (var i=0;i < elems.length;i++){ elems[i].style.setProperty("background-color", "yellow", "important"); } isi.style.color="red"; //font color } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script> Nothing from this code either
  4. I want to be able to limit inline edits/inserts on a datapage. I'm trying to limit a date to dates that are after 1 week ago. Is there a way I can do this?
  5. Will this code work for edits made on Search/Report datapages too? I'm trying to validate that an updated/inserted date is not more than 1 week before the current date. And if so, where does the last string of code go?
  6. Nothing from this code: <div id="visi[@field:lines_Line_Number]">[@field:dates_Customer_Expected_Date*]</div> <script> var isi = document.getElementById("visi[@field:lines_Line_Number]"); if('[@field:dates_Customer_Expected_Date*]' < '[@cbTimestamp*]'){ var elems = isi.parentNode.parentNode.querySelectorAll("td"); for (var i=0;i < elems.length;i++){ elems[i].backgroundColor="yellow !important"; } isi.style.color="red"; //font color } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script> Is this what you meant?
  7. EDIT: had a different formatting issue! it works fine. Nope. When I add that, nothing gets highlighted.
  8. Perfect, thanks! Another question, is there a way I can add an AND to the conditional? I'd like to check if a specific field is not marked 'C'. Here's what I tried: if('[@field:dates_Customer_Expected_Date*]' < '[@cbTimestamp*]' && '[@field:Engineering_Traveler_Released]' != 'C')
  9. Same result. Here's what I put, let me know if I did it wrong. isi.parentNode.parentNode.querySelector("td:nth-child(1)").style.backgroundColor="yellow";
  10. I'd like to have a colored table that can highlight past due items. This is the code I have in an HTML block that highlights the row of past due dates and turns the font color red. <div id="visi[@field:lines_Line_Number]">[@field:dates_Customer_Expected_Date*]</div> <script> var isi = document.getElementById("visi[@field:lines_Line_Number]"); if('[@field:dates_Customer_Expected_Date*]' < '[@cbTimestamp*]'){ isi.parentNode.parentNode.style.backgroundColor = 'yellow'; //background color isi.style.color="red"; //font color } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script> Meanwhile, this is part of the color I have in my header that turns the column headers and background different colors. style type="text/css">[class*=cbResultSetHeaderCell]:nth-child(1) { background: #3377FF !important; } td[class*="cbResultSetData"]:nth-of-type(1){ background-color: #4D88FF !important; } [class*=cbResultSetHeaderCell]:nth-child(2) { background: #1966FF !important; } td[class*="cbResultSetData"]:nth-of-type(2){ background-color: #3377FF !important; } [class*=cbResultSetHeaderCell]:nth-child(3) { background: #0055FF !important; } td[class*="cbResultSetData"]:nth-of-type(3){ background-color: #1966FF !important; } [class*=cbResultSetHeaderCell]:nth-child(4) { background: #cc0000 !important; } td[class*="cbResultSetData"]:nth-of-type(4){ background-color: #E60000 !important; } [class*=cbResultSetHeaderCell]:nth-child(5) { background: #cc0000 !important; } Here is the result of this code: Clearly, the highlight works as it applies to uncolored columns. How do I alter the code so that the highlight is prioritized and will override any existing color?
  11. Oh I don't need it to apply across the entire row. Just a couple of select columns. Here's the result I got from that code: I want it to apply to the PO Ship Date and the Expected Ship Date columns (both of which I have as HTML blocks with the code) but for some reason it only highlights the first HTML block red (I've tried with PO Ship in front and with Expected Ship in front it only applies to whichever is first). Here's the code I have in each HTML block (with Expected Ship instead of PO Ship). <div id="visi[@field:tbl_ggl_job_lines_Line_Number]">[@field:PO_Ship_Date*]</div> <script> var isi = document.getElementById("visi[@field:tbl_ggl_job_lines_Line_Number]"); if('[@field:PO_Ship_Date*]' < '[@cbTimestamp*]'){ var elems = isi.parentNode.parentNode.querySelectorAll("td"); isi.style.color="red"; //font color } </script> But this is the result I get from that code:
  12. I have a VERY large table and after some number of columns, the vertical headers get out of alignment by a bit. (The date is supposed to be under "FAT Due" and the blank space under "Assembly Due") Here is the code I'm using: <style type="text/css"> [class*="cbResultSetHeaderCell"]{ text-align:center !important; vertical-align:center !important; } .cbResultSetLabel:nth-child(35),.cbResultSetLabel:nth-child(36),.cbResultSetLabel:nth-child(37),.cbResultSetLabel:nth-child(39),.cbResultSetLabel:nth-child(40),.cbResultSetLabel:nth-child(41),.cbResultSetLabel:nth-child(42),.cbResultSetLabel:nth-child(43),.cbResultSetLabel:nth-child(44),.cbResultSetLabel:nth-child(46),.cbResultSetLabel:nth-child(47),.cbResultSetLabel:nth-child(48),.cbResultSetLabel:nth-child(49),.cbResultSetLabel:nth-child(50),.cbResultSetLabel:nth-child(51),.cbResultSetLabel:nth-child(52),.cbResultSetLabel:nth-child(53),.cbResultSetLabel:nth-child(54),.cbResultSetLabel:nth-child(55),.cbResultSetLabel:nth-child(56),.cbResultSetLabel:nth-child(57),.cbResultSetLabel:nth-child(58),.cbResultSetLabel:nth-child(59),.cbResultSetLabel:nth-child(61),.cbResultSetLabel:nth-child(62),.cbResultSetLabel:nth-child(63),.cbResultSetLabel:nth-child(64),.cbResultSetLabel:nth-child(65),.cbResultSetLabel:nth-child(66),.cbResultSetLabel:nth-child(67),.cbResultSetLabel:nth-child(68),.cbResultSetLabel:nth-child(69),.cbResultSetLabel:nth-child(70),.cbResultSetLabel:nth-child(71),.cbResultSetLabel:nth-child(72),.cbResultSetLabel:nth-child(73),.cbResultSetLabel:nth-child(75),.cbResultSetLabel:nth-child(76),.cbResultSetLabel:nth-child(77),.cbResultSetLabel:nth-child(78),.cbResultSetLabel:nth-child(79),.cbResultSetLabel:nth-child(80),.cbResultSetLabel:nth-child(81),.cbResultSetLabel:nth-child(82),.cbResultSetLabel:nth-child(83),.cbResultSetLabel:nth-child(84),.cbResultSetLabel:nth-child(86),.cbResultSetLabel:nth-child(87),.cbResultSetLabel:nth-child(88),.cbResultSetLabel:nth-child(89),.cbResultSetLabel:nth-child(90),.cbResultSetLabel:nth-child(92),.cbResultSetLabel:nth-child(93),.cbResultSetLabel:nth-child(94),.cbResultSetLabel:nth-child(95),.cbResultSetLabel:nth-child(97),.cbResultSetLabel:nth-child(98),.cbResultSetLabel:nth-child(99),.cbResultSetLabel:nth-child(100) { writing-mode:vertical-rl; white-space: pre; transform: rotate(180deg); border:none; } </style> It transforms 60+ columns. Any ideas on how to fix this?
  13. Yes, thanks! The quotation seems to fix the issue. But it is only working on one column at a time. I need to be able to conditionally make the font in multiple different columns red. How can I do this? (both columns should be red but only the first one turns red)
  14. I want to change the color of an entire column. No conditionals necessary.
  15. I have an even larger table and after some number of columns, it gets off a bit. (The date is supposed to be under "FAT Due" and the blank space under "Assembly Due") Here is the code I'm using: <style type="text/css"> [class*="cbResultSetHeaderCell"]{ text-align:center !important; vertical-align:center !important; } .cbResultSetLabel:nth-child(35),.cbResultSetLabel:nth-child(36),.cbResultSetLabel:nth-child(37),.cbResultSetLabel:nth-child(39),.cbResultSetLabel:nth-child(40),.cbResultSetLabel:nth-child(41),.cbResultSetLabel:nth-child(42),.cbResultSetLabel:nth-child(43),.cbResultSetLabel:nth-child(44),.cbResultSetLabel:nth-child(46),.cbResultSetLabel:nth-child(47),.cbResultSetLabel:nth-child(48),.cbResultSetLabel:nth-child(49),.cbResultSetLabel:nth-child(50),.cbResultSetLabel:nth-child(51),.cbResultSetLabel:nth-child(52),.cbResultSetLabel:nth-child(53),.cbResultSetLabel:nth-child(54),.cbResultSetLabel:nth-child(55),.cbResultSetLabel:nth-child(56),.cbResultSetLabel:nth-child(57),.cbResultSetLabel:nth-child(58),.cbResultSetLabel:nth-child(59),.cbResultSetLabel:nth-child(61),.cbResultSetLabel:nth-child(62),.cbResultSetLabel:nth-child(63),.cbResultSetLabel:nth-child(64),.cbResultSetLabel:nth-child(65),.cbResultSetLabel:nth-child(66),.cbResultSetLabel:nth-child(67),.cbResultSetLabel:nth-child(68),.cbResultSetLabel:nth-child(69),.cbResultSetLabel:nth-child(70),.cbResultSetLabel:nth-child(71),.cbResultSetLabel:nth-child(72),.cbResultSetLabel:nth-child(73),.cbResultSetLabel:nth-child(75),.cbResultSetLabel:nth-child(76),.cbResultSetLabel:nth-child(77),.cbResultSetLabel:nth-child(78),.cbResultSetLabel:nth-child(79),.cbResultSetLabel:nth-child(80),.cbResultSetLabel:nth-child(81),.cbResultSetLabel:nth-child(82),.cbResultSetLabel:nth-child(83),.cbResultSetLabel:nth-child(84),.cbResultSetLabel:nth-child(86),.cbResultSetLabel:nth-child(87),.cbResultSetLabel:nth-child(88),.cbResultSetLabel:nth-child(89),.cbResultSetLabel:nth-child(90),.cbResultSetLabel:nth-child(92),.cbResultSetLabel:nth-child(93),.cbResultSetLabel:nth-child(94),.cbResultSetLabel:nth-child(95),.cbResultSetLabel:nth-child(97),.cbResultSetLabel:nth-child(98),.cbResultSetLabel:nth-child(99),.cbResultSetLabel:nth-child(100) { writing-mode:vertical-rl; white-space: pre; transform: rotate(180deg); border:none; } </style> It transforms 60+ columns. Any ideas on how to fix this?
  16. Hi again, I have a related question. I'm looking for a similar outcome, if the due date has passed then highlight but instead of having a number of days, I now only have a date. Here is the code I'm currently trying to use: <div id="visi[@field:lines_Line_Number]">[@field:dates_Customer_Expected_Date*]</div> <script> var isi = document.getElementById("visi[@field:lines_Line_Number]"); if([@field:dates_Customer_Expected_Date*] < [@cbTimestamp*]){ isi.parentNode.parentNode.style.backgroundColor = 'yellow'; //background color isi.style.color="red"; //font color } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script> But it only highlights dates in 06/2021 or 08/2021. Is there a different way to compare dates? Thanks!
  17. I'd like to have different colors for some of my column headers so that I can group them together. How can I do this?
  18. When I past the code into my source, it autocorrects to this after I exit the source code screen. <h1>Engineering Schedule</h1> <style> #target table:nth-of-type(1) td:nth-of-type(7) {display: none;} #target table:nth-of-type(1) th:nth-of-type(7) {display: none;} </style> <div id="target"> <header></header> </div> Once autocorrecting to this, it no longer works.
  19. Hi, this solution gets autocorrected by caspio and no longer works. Is there a more up-to-date solution?
  20. I have a rather complicated task that I'm trying to execute. This may take a bit of explaining. It references three lookup tables and two other tables. The point of this task is to set a number of days required to complete a specific task (Engineering, Welding, etc.) in a project. These days vary based on the unit size and type. Here is part of the table that I am using for reference so that you can understand what I'm working with. So for a job making a "Non Jacket Bin" that is under 500L, the Engineering task should take 5 days and the Weld task should take 10 days. Here is the task as I currently have it. So the table that this is updating is specifically for tracking the number of days required to complete each operation for a job line. It is connected to the job lines table via a Line Number. Right now I only have it updating the days it takes in Engineering but I will add Weld and more. That's why I have the joins in the Update statement and not the select - just to avoid redundancy. So first, it joins the days line number to the lines line number. Then it takes the unit size and joins it to a lookup table. This lookup table is used to convert the size to an integer. In the lines table it is written as "100L" so this join just allows for a value "Liters" to be used later which removes the L. The next join connects the Unit Type to another lookup table which will be used to find the general category the type is in ("Bin" rather than a code like "BINX"). Finally, this is joined to a table that is similar to the one pictured above. Here is part of that table for reference: (The days are the days before the ship date) The Unit Size refers to anything that is less than or equal to that number. Thus, why my join is on Liters >= Unit Size. I then sort the select by the unit size ASC which should connect Liters to the smallest Unit size without going over. Instead, what I get is all units, regardless of size, assigned the smallest days. What am I doing wrong? Any help would be appreciated!
  21. I have a formula field which calculates a number value perfectly but I'd like to add a letter to the front of the number so I assume that means I need to cast my result to a string. Here is my formula right now: SELECT MAX(Clean_Job) FROM tbl_ggl_job WHERE Job_Letter = 'CC') + 1 Which gets the max job number that is currently in use and adds 1 to that. So if the max job is CC100 this would return 101. I'd like to concatenate this with the Job Letter CC so that the result would look like CC101. How can I do this?
  22. I'd like for file paths in my tabular report to be translated as links so that I can click them and see the related file. Is there a way to do this?
  23. I have a search and report for current projects. Some of these projects are on hold and so I want to create a field in the search to display all projects when checked but when not checked just show projects that are not on hold (field should say "Include jobs on hold?" and be unchecked by default). I'm at a loss for how to do this. In my table, the value for "On Hold" is just a checkbox, where checked is true and unchecked is false. I'm open to any ideas for how to do this, even if it requires shuffling things around. Thanks!
×
×
  • Create New...