Jump to content

DesiLogi

Caspio Rockstar
  • Content Count

    282
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by DesiLogi

  1. @kpcollierIt's been awhile since I posted this but I believe the issue can be fixed in the Tables Relationships view. When you create a relationship with a table it allows you to choose a display value instead of the Id. When you use that field in an inline edit datapage it will then use the display field for the user (while storing the id field) when editing. See the screenshot. Hope this helps-
  2. I just found this suggestion--this is ace! I hadn't thought of this workaround and it solves the very poor 'hourly' limit on Tasks. Thanks for posting PrinceZuko!
  3. Ok, after trying tons of stuff I finally came up with the answer, in case anybody needs to pull tabular, inline values from Caspio and use them in javascript. First, create a div with an id that uses the unique identify Caspio field: <div style="width:100%;text-align:right;" id='mydiva[@field:HProjectID]'></div> Then use some script with an EventListener to grap the current value in the div and use it as a parameter in some javascript. I have the js running in the a link. Whatever is in the div inside the EventListener function will show up in the above div. I use a c
  4. This code will run when the button is clicked (button id ="alertsbtn") and it will get the first value in the record set, and then cycle through all records. It doesn't get a value if the button in a record that's not the first is clicked. So it seems like this is fairly close to working, if someone can figure out the adjustment I'd really appreciate it. ** I have an alert box running to test the code, instead of the full code. <script type="text/javascript"> document.getElementById("alertsbtn").addEventListener("click", function(){ var isi = document.querySelector("#visi[@
  5. Hi CooperBackpack, Many thanks for the code--I was thinking it would be something like using innerHTML but didn't know how to implement it. Now it will read a value for @field:HProjectID but it's giving the same number '3' for each record. So it seems like it's not catching each row's (record) individual HProjectID value. Am I missing something else? EDIT: it's odd because the <span> shows the correct HProjectID value so it is getting that. The issue is the variable 'isi' doesn't seem to be picking it up, instead pulling a random value '3'. 2nd EDIT: I think the answer
  6. Hi, Does anyone know how, in a tabular datapage's results, to get a record's value and use it as a parameter in a javascript function that sets the source for an iframe on the host page? I have a link/button to run a js function in an html block in the tabular results (meaning each record has that link, so if there's 20 records there's 20 of the same links/buttons, one in each row): <input class="buttonlink" type="button" onclick="ifrtrack()" value="Reports" /> I have this code in the datapage's footer. It resets the source for an iframe (id="tracking") on the host page
  7. Hi LittleMsGinger, Thanks for the help with this. I did find the Current Week criteria and that does work well to bring up the current week. The problem is that the user might want to scroll before weeks and I think that locks you into the current week. If there's a way to have it open to the current week as per above but then be scrollable, by the week, to previous weeks, that's what I need. Thanks again for the help, though, much appreciated!
  8. A couple years later--just want to say this is perfect and really helpful- thanks for posting it.
  9. Ok I finally figured it out, if anyone needs this solution in the future. The first post in this thread shows how to dynamically update the source of an iframe in a new window, in a new tab, but I needed to do this in the same tab and the js code kept getting wiped out when the new location was opened (I tried to append script to the new page's head, etc. but never could get it to work). So the solution to opening a new location/datapage in the same tab and dynamically setting the source for an iframe is to use Caspio's unique abilities in conjunction with regular js/html. Sometimes it'
  10. I updated the original post with a closer, better solution and so have deleted this post.
  11. I've got a dropdown menu that I need the links to run a function in order to open a new window (in '_self') and then change that new window's iframe source (same domain as parent). I'm calling the function from a linked js file that runs the code correctly but ONLY if the new window is opened in a new tab. I've seen a lot of posts about how to transfer the js function to the new window but none of them if it's opened '_self'. Here's what I have so far (It's on a test server right now, hence the 127 address for the js file): function newWindow() { var win = window.open('projects/proj
  12. Just figured this out, if anyone needs it. Was simpler than I thought, just remove the button's onclick fucntion lines: <script type="text/javascript"> var width = 1100; var v_href= "http://127.0.0.1:9090/shortcuts/universal-item-search2?"; parent.$.fancybox.open({ closeBtn:false, openEffect : 'none', closeEffect : 'none', modal:true, type:'iframe', autoSize:true, width:width, href:v_href }); </script>
  13. Hello, I can't figure out the right syntax for this jquery code to run automatically after submission/update. It runs now (in the datapage footer) when the Submit button is clicked (it opens a FancyBox) but I need it to run after submission by a slight delay. The reason is that on Submit table A runs a trigger that updates table B and the FancyBox (opens another datapage in an iFrame) uses table B. Sometimes the FancyBox opens too fast, before the trigger has updated table B, and so it doesn't show the latest value. I figure if the code that opens the fancybox runs in the
  14. I figured this out, if anyone else needs it. Basically, I have a button that uses the class to call the fancybox code but also an onclick that calls the submit code separately. This way both of the functions work in sequence. Here's the button: <button class="cbpop btaction" href="#" data-width="1100" data-href="../shortcuts/universal-item-search" onclick="myFunction()"><i class="fa fa-search fa-lg"></i></button> And here's the script in the datapage footer. I have the Destination set to 'Same Form.' Note that the code opens the fancybox in the parent as th
  15. Actually, I have a button that runs a version of the above code to open the fancybox. All I need to do now is make the form submit/update after the the fancybox is initiated (or before but I think that'll end the code running so the fancybox won't initiate). Does anyone know how/where to put code into this to submit the form? <script> $('.cbpop').each(function(index, el){ var width = 450; var v_href= $(el).attr('href'); var v_keyword= document.getElementsByName("EditRecordKeyword")[0].value; var v_key= "?key="; var v_urlend = v_key + v_keyword; if (v_href=="#") { v_href=$(el).attr
  16. Hi, I have a Details (or single record update, haven't decided yet) form that, when updated, I need to open a fancybox that brings up another web page. The Details/Single-Rec-Update form would ideally be set to 'Same Form' for destination but I think I need to use Message in order to put code in. The below code is taken from what I'd been using with a button to open the fancybox but with the data-href put in (whereas the button would put that in before). Does anyone know what mods need to be done to this code for it to work (open a fancy box with a new web page after submission/upda
  17. Hello, I've got a Single Record Update datapage that has a number of cascading dropdowns. I need to check 2 values (one a table's field and the other a virtual field) and if they're not equal then make the cascading drop down values null or blank. I can get this to work for a regular text field but not cascading dropdowns. The code so far is: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var x = document.querySelector('[name*=cbParamVirtual1]').value; var y = document.getElementById("EditRecordProjectID").value; var xclear =
  18. Hi NiceDuck, Sorry about the late reply--for some reason I haven't been getting notifications when an thread is updated. Thanks re the tips--I ended up having to use a separate field for the table to get the local computer's date/time, and then use that in the trigger. When I tried GetSysDate I often would get a UTC date that was not the same as my user's date (I have users in the U.S., Australia, and the U.K. so it's literally all over the map). I put some code in the footer to get the local date/time, if anyone needs it: <SCRIPT LANGUAGE="JavaScript"> /* Declara
  19. Hi Vitalikssssss, Sorry it took so long to reply--I stopped getting notifications for thread updates for some reason. Many thanks for posting this code- I have to use drop downs for data choice reasons so I'll give this a shot. Very much appreciate it! Best, Kevin
  20. Hi SinJunYoung, Many thanks for that tip- I did not catch that as an option for the Search/Filter date. It works really nicely except for one thing-I need the user to be able to change the week they want to Search/Filter by so the date needs a Begin/End criteria that's visible. I just need the current date to open by default so they don't have to enter it in themselves (bad design if they did). Here's some js I put together to get the Sunday before the current date and then add 6 days to it for the following Saturday, and then to put that into the Date Criteria for Begin and End d
  21. I don't know if this is possible but I need to set Search date criteria Begin and End dates as weekly blocks (current week), by default. Meaning, the 'Begin Date' of the criteria has a default of the Sunday before (or on) the current date and the 'End Date' has a default of the Saturday after (or on) the current date. I'm using a Pivot Table to show totals over a workweek period, using a 'ServiceDate' date field for the columns. The user needs to see just the current week (7 days) so I have 'ServiceDate' in the Search or Filter section, with criteria for 'Begin Date' and 'End Date.' The
  22. Hi, I don't know if this is possible but I need to set Search date criteria Begin and End dates as weekly blocks (current week), by default. Meaning, the 'Begin Date' of the criteria has a default of the Sunday before (or on) the current date and the 'End Date' has a default of the Saturday after (or on) the current date. I'm using a Pivot Table to show totals over a workweek period, using a 'ServiceDate' date field for the columns. The user needs to see just the current week (7 days) so I have 'ServiceDate' in the Search or Filter section, with criteria for 'Begin Date' and 'End D
  23. Hi, I don't know if this is possible but I need to set Search date criteria Begin and End dates as weekly blocks (current week), by default. Meaning, the 'Begin Date' of the criteria has a default of the Sunday before (or on) the current date and the 'End Date' has a default of the Saturday after (or on) the current date. I'm using a Pivot Table to show totals over a workweek period, using a 'ServiceDate' date field for the columns. The user needs to see just the current week (7 days) so I have 'ServiceDate' in the Search or Filter section, with criteria for 'Begin Date' and 'End D
  24. Hi Telly, Just saw you'd answered this (I'm not getting notifications for some reason). I will check it out and thank you.
×
×
  • Create New...