Jump to content


Caspio Guru
  • Content Count

  • Joined

  • Last visited

  • Days Won


DesiLogi last won the day on April 1

DesiLogi had the most liked content!

1 Follower

About DesiLogi

  • Rank
    Advanced Member

Recent Profile Visitors

2,122 profile views
  1. Hi CopperBackpack, Sorry about the late reply (couldn't get to this part of the project till now) but THANKS for the solution on this, it really helps!
  2. Does anyone know how to use 'contains' in a calculated field to see if the field contains a certain value, instead of using = to equal it. I have a tale with records that have a field with values like 524_789B, 524_788B, 524_794B, 524_791B, 524_1047B. And an authenticated field value might be 524_794B. I want to count the number of records that contain 524_794B. So in a calculated field I need something like below: SELECT COUNT (ItemID) FROM _V_Items Where Assigned_To CONTAINS '[@authfield:Users_CID_StaffID]' What is the syntax for 'contains'?
  3. I figured out a sort of workaround. The 'Replace' clause will remove a string and replace it with something else. In case anyone needs something like this: Field3 formula = Replace([@field:field1],[@field:field2],'') The only issue is this leaves an extra space where field2 used to be but it works ok otherwise.
  4. Hello, Does anyone know, in a formula field in a table, how to remove the value of a text field from another text field? There are 3 fields involved: Field1: text255 that contains comma delimited values. Field2: text255 that contains a value that may or may not be included in Field1 string value Field3: formula: removes field2 value from field1 if that value is in field1 (and does nothing if not). For example: Field 1 (text255) = 524_789B, 524_788B, 524_794B, 524_791B, 524_1047B Field 2 (text255) = 524_794B, Field 3 (formula) = 524_789B, 524_788B, 524_791B, 524_1047B What would be the formula for Filed 3 to do this? Many thanks!
  5. Hi Meekee, This is an older post that I just found and I wanted to thank you for putting the code up, as I needed it. Works perfectly!
  6. I figured out the solution, if anyone needs it. An EventListener makes it work: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var x = document.querySelector('[name*=cbParamVirtual18]'); x.onchange = function() { var v_virtc = document.getElementsByName("cbParamVirtual18")[0].value; document.getElementsByName("InsertRecordTaxable")[0].value = v_virtc; } }); </script>
  7. Hello, I have a field that normally would be a cascading radio button whose value is dependent on the selection of another field's dropdown value (the parent). However, I need the user to be able to over-ride the cascaded value occasionally. You can't do this normally so I'm trying to use js to do it. There is a text field set to Dropdown, called 'SalesCode.' A Virtual field (Virtual 18) is set to Cascading Text Field so it can receive a value when 'SalesCode' (the parent) is updated. The text field called 'Taxable' is the one I need to update. It's set to a Radio Button with 2 custom choices ('tax' or 'non'). The code I think I need is 'on change' for the SalesCode drop down field. Meaning when the user updates the SalesCode value, it updates Virtual18 (cascaded) and then the code takes the value of Virtual18 and puts in in the Taxable field's Radio Button value (the value in Virtual18 will always be either 'tax' or 'non' so it corresponds with the custom choices in Taxable). If the user wants to override that Taxable value they can change the radio button choice. The code below is something like I think I need but I can't get it to work, any help would be really great! <script> $("#InsertRecordSalesCode").change(function(){ var v_tax = document.getElementsByName("cbParamVirtual18")[0].value; document.getElementsByName("InsertRecordTaxable")[0].value = v_tax; }); </script>
  8. Hi Douvega, Thanks for the tip- I'm glad it's doable but I think it's definitely going to be beyond my own abilities. However, at least I have a way to talk about it with my developer, which helps.
  9. Hi Vitalikssssss, Thanks for the tip- I hadn't thought of using css. That does help the datapage not 'flash' when it opens/auto-submits, which is better. I was hoping there'd be a way to 'run' the datapage in the background and not even have it display (for a second) so the user doesn't know it's there. This solution is a step in the right direction though- thanks!
  10. Hi, Does anyone know if it's possible (and then how) to make a submission form invisible so the user doesn't see it at all (and not the 1 second flash normally with auto-submit)? I have one submission form that passes a parameter (after submit) to another submission form (that has js auto-submit code) so that the new autoID value from the first submission form can be pasted into a new record in a different table (via the 2nd submission form). I have to do it this way instead of using a trigger on the 1st submission form's table because of back-end sql triggers locking the table and not being able to use front-end triggers. So this is a workaround. It's really clunky and time consuming for the user to have the 2nd submission form open and 'flash' (whether the time interval is set to 500 or 1000 it still is ugly) before auto-submitting. I was hoping there'd be a different way to deploy the 2nd submission form, maybe in a web page that's on the server but doesn't 'show' or something like that. Any ideas? Thanks!
  11. Hi, Does anyone know how/where to change the css in the Styles for the Bulk Edit link when it's hovered over, for a tabular datapage. I can change the style for the link in Source/Page Action section: .cbResultSetBulkEditActionLink { /*Results Page Bulk Edit ActionLink Attributes (For Gallery And List Pages)*/ color: green; font-family: Arial, sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; } However, this only changes the link style when it's not hovered over. When hovered over the 'Bulk Edit' link reverts to its default styling and looks jarring. There must be some css somewhere for something like .cbResultSetBulkEditActionLink:hover but I cannot find it. EDIT: In case anyone needs a solution to something like this, I ended up sort of finding a solution. If you put _hover after it (what Caspio seems to use to designate hover), it basically removes the hover effect (it's supposed to change it, if you change the css but it seems to have just disabled hover). So if you put something like: .cbResultSetBulkEditActionLink { /*Results Page Bulk Edit ActionLink Attributes (For Gallery And List Pages)*/ color: green; font-family: Arial, sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; } .cbResultSetBulkEditActionLink_hover { /*Results Page Bulk Edit ActionLink Attributes (For Gallery And List Pages)*/ color: green; font-family: Arial, sans-serif; font-size: 14px; font-weight: 800; text-decoration: none; } in Source/User Defined Styles it seems to work.
  12. Does anyone know how to use Amazon AWS S3 for files (pdf in this case) that are not public but that can be accessed by an authenticated Caspio datapage? I'm using Google Docs Viewer to display uploaded pdf files but it only works if the directory that the pdf file is in is Filestor enabled. The pdf files are proprietary to my users and cannot be public so I cannot use Filestor. I tested out an Amazon AWS solution (putting the pdf file in an S3 Bucket) and storing the S3 file url in a Caspio table, then using that file url with Google Docs Viewer to display the pdf. This does work but of course the S3 file has to be set to 'public' in order to display, which of course is the same issue as with a non-Filestor Caspio file folder. I was hoping to somehow set the AWS S3 bucket to have permissions (and a password) that I could reference in the datapage script that opens the pdf viewer. This way the pdf file wouldn't be public but would still be accessible from a Caspio datapage (the datapage would be authenticated so only the owner of the file would have access to it). It'd be so much easier if Caspio had a pdf viewer (pdf viewed in the browser or a datapate) instead of just downloading to the local computer. But an AWS solution might also work, I just don't know how to get/set permissions to use my specific AWS S3 buckets. Any help would be very much appreciated!
  13. Hi Hastur, Here's an odd thing as well. Some pdf files are showing and some will just download when the file name is clicked on. In testing they're both in the same Filestor enabled folder and I can't see any different in the pdfs themselves. Here's a copy of a pdf file that's not showing up, if you have a chance to take a look. I don't know why this file is any different. Thanks again for the help! EDIT: I think I figured out the reason for the attached file not displaying- it was physically larger than the iframe width setting. I changed the iframe to 100% width and height and it does show up now. So there is the remaining issue: How to get this to work with a non-Filestor folder for the pdf file. Here's a way to possibly tell the difference between the pdf being in a Filestore enabled directory vs one that's disabled: Path with Filestor enabled: https://docs.google.com/viewerng/viewer?url=https://cdn.caspio.com/C2104000/Moodboards/LivingRoom.pdf?ver%3D3 Path with Filestor disabled: https://docs.google.com/viewerng/viewer?url=https://c0afw773.caspio.com/dp/c2104000eb3da3ff88184764b5a3/files/8172684 It seems to me that it if the user has authenticated in Caspio (and they have in my example) then the file should be accessible to that browser to do whatever with, even if the directory is Filestor/disabled. The file can be opened in a datapage, downloaded, etc. So why can't Google Doc Viewer display it? The url must need some kind of modification or something. LivingRoom.pdf
  14. I just realized that this does work: the code opens the PDF when the filename is clicked on (so instead of downloading the pdf it is opened in the browser). I'd thought the datapage would display the pdf upon opening so I'd thought it wasn't working. This actually great- it does display the pdf as I need to, and clicking on the filename is no problem. The last issue is figuring out how to do it in a Filestor disabled folder because the files are private. This forum thread addresses that aspect of it. It would be great if we could combine the non-Filestor aspect of that code with this code, then it'd be an awesome solution.
  15. Hi Hastur, Thanks for the code on this- I can't get it to work in testing, though. I do have Filestor enabled on the directory the pdf is located in so I'm not sure what the issue is. That said, the pdf files I need to display are sensitive to the user so they can't ultimately be in a Filestor enabled folder. There's an old thread that addresses this issue but I can't get the script to work from that either. Is the code you posted working in your own testing? I'm trying to figure out why I can't get the pdf to display even in a Filestor folder. Thanks again for the help. If we can get this worked out I imagine it would be useful for a lot of Caspio users.
  • Create New...