Jump to content

Ras2019

Caspio Ninja
  • Content Count

    28
  • Joined

  • Last visited

Everything posted by Ras2019

  1. Hi, Support gave the solution for the error message so sharing... Had to put a NULLIF in the second expression, that did it. NULLIF((SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]'),0) Cheers Ras.
  2. Hi, I need a select statement which counts and divide based on conditions and authorization. I run into a problem with formula not accepting division if there is a authorization involved.... it will accept Multiplication and Addition etc. but not if its division.. This statement is working (with Multiplication) (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') * (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') Same statement (with Division) is not working i.e. not accepted in the formula (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') / (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') Same Statement (with Division) but without authorization will work and is accepted in formula (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used') / (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired') Appreciate if anyone have ideas of what can be the issue! Sincerely Ras
  3. Vitalikssssss helped me solve the HTML responsive issue and I wanted to share to forum if other counter the same issue. Thanks Vitalikssssss ************************************** I have managed to resolve the issue by shrinking the HTML block width to certain width. You can adjust Caspio Style used on Datapage or add the following code in DP Header: <style> @media only screen and (max-width: 575px) { .cbHTMLBlockContainer { width: 200px !important; } } </style> Regards, Vitalikssssss
  4. Hi, thanks. I have sent you a link so you can see the issue in effect. Sincerely Ras
  5. Hi, On my website where datapages with HTML Blocks are deployed, it seems there is a conflict with the website CSS and the Caspio Style CSS and I cant figure out what custom CSS to put in the styles to avoid such conflict. This is how my HTML Blocks turn out responsive going out our over my container on the site - other data fields adjust fine! Have anyone experienced same issue with HTML Block in responsive sites - and dealt with it? Sincerely Ras
  6. Hi Ginger, Thanks for your response! Both solutions will do the job, but which one of those two would be the best practice from a data management point of view? Sincerely Ras
  7. Hello, What is best practice for deleting or cancel a record in a table. 1. Keep the record in the table, but make a status field which can filter out the row based on e.g. a cancellation status. 2. Delete the record in the table, but make a separate log table for records deleted. I need to consider the table design for future API integrations, and general best practice. Any recommendations would be appreciated. Sincerely Ras
  8. Hi, I have deployed Google Maps based on Geocodes on a Tabular Datapage and that work. However, I would like different appearance on the site. I have done some testing on other Datapages and settings in the map tutorial to see different outcomes, but cant really get that to work displaying locations/orders in the map. This is what I eventually would like to have: 1. Hide the search and table result and only get the map deployed, showing order location and still be able to hover curser on the marker to see details in bubble. 2. Where I have more than 1 order there should be multiple Markers e.g. stacked , even they have same location (right not it only show 1 marker per location. This is how it currently look, where it has the table and only show 1 marker, though there are 4 orders: If anyone have experienced same challenge, and perhaps have suggestions to accomplish this i would be very happy. Sincerely Ras
  9. Hi, problem solved. Statement 2. suddenly worked after I kept working and making changes on the data page - not sure what caused the initial glitch! Ras
  10. Hi, in the Company user table its a text field (255) consisting of 8 characters. It originates as a 8 Charaters Random ID from a Company table though. Ras
  11. Hi, I have a Details Datapage where i would like to use a SELECT statements to pull data another table into a Virtual Calculated Field. It goes well so far as pulling the count across all Company_ID's, but when I add RLS to the statement values turn 0 even though the formula is verified. - Both, Booking_Status & Assign_To are in the table Bookings - Assign_To is a text field (255) that match the [@authfield:Company_Users_tbl_Company_ID] I have tried various combinations and expression like: 1. SELECT COUNT(DISTINCT Booking_Status) AS Pending FROM Bookings WHERE Assign_To = '[@authfield:Company_Users_tbl_Company_ID]' 2. SELECT COUNT(Booking_Status) from Bookings WHERE Booking_Status='Pending' AND Assign_To = '[@authfield:Company_Users_tbl_Company_ID]' Though, the formulas are both verified but not working as they return 0, i think perhaps that the table field Assign_To needs to have a FROM Bookings reference, this i have tried as well without luck. I would appreciate very much if anyone have suggestions to a correct statements. Sincerely Ras
  12. Hi, Apparently, that script was not fond of Bootstrap, so i ended up finding a new Tooltip that works just a good. If anyone else experience same issues you can find some good examples for Bootstrap here https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-tooltips.php Thanks Ras
  13. Hi. This Tool Tip script was great, and I used it for testing on a Weebly.com site and it worked like a charm... Since I have now moved all my datapages over to a Bootstrap Dashboard, away from Weebly the script does not work as before .. suspect its due to CSS code on the new site. I have tried make the Tool Tip script overwrite any existing CSS, by adding !important...but in vain... do you Vitalik or anyone have a suggestion of how to make this script take precedence over any other existing CSS? Script in Header: <style> .tooltip { border-bottom: 1px dotted #000000; color: #000000; outline: none; cursor: help; text-decoration: none; position: relative; } .tooltip span { margin-left: -999em; position: absolute; } .tooltip:hover span { border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); font-family: Calibri, Tahoma, Geneva, sans-serif; position: absolute; right: 1em; top: 2em; z-index: 99; margin-left: 0; width: 150px; } .tooltip:hover img { border: 0; margin: -10px 0 0 -55px; float: right; position: absolute; } .tooltip:hover em { font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold; display: block; padding: 0.2em 0 0.6em 0; } .classic { padding: 0.8em 1em; } * html a:hover { background: transparent; } .classic {background:#FFFFFF; border: 1px solid #72A435; </style> Code in HTML Block <a class="tooltip" href="#">Info<span class="classic"> <b>Flight#</b>:[@field:Vessel]<br/> <b>Aircraft Type</b>:[@field:Aircraft_Type]<br/> <b>Cut Off</b>:[@field:Cut_Off]<br/> <b>Transit Time</b>:[@field:Transit_Time]<br/> <b>Stops</b>:[@field:Stop]<br/> <b>Transit Airport</b>:[@field:Transit_Via]<br/> <b>2nd Carrier</b>:[@field:Carrier_2]<br/> <b>2nd Flight#</b>:[@field:Vessel_2]<br/> </span></a> Sincerely Ras
  14. Hi Vitalikssssss, Thanks for the tip. That was excately what i was looking for and it works great! Sincerely Ras
  15. Hi, I would like to make a mouseover popup in a HTML Block/Link in a result page, so user do not have to click to enter the full details page. The popup will just quickly list some main milestones (field values) that are in the details page. Relative to this without graphics, i just need 8 fields listed .: I suppose i have to make a HTML data page, that is resized somehow and then pull that as a popup. Does any one have some tips or script references? Sincerely Ras
  16. Thanks Vitalikassssss, Then I will not dwell more over that, and I will go for the alternative. Sincerely Ras
  17. Hi, I have a Search Result Page from where I need to pass sensitive pricing parameters to a submission web form (via a link in a HTML Block). I do not want users to be able manipulate the parameters in the address bar, and then it appears that the query string method is obsolete. So I was looking as how to pass internally via Caspio Bridge. But, then I have read on https://howto.caspio.com/parameters/passing-parameters/ that: Passing parameters from Results Page can be achieved using a query string. I intrepret that, and have tested it as well, as you cannot pass parameters internally via Caspio Bridge from a Result Page to a Web Form..... Is that correct? .....at least I cannot get it to work. Followed the howto guide, but the default selection keep switching back to external parameters setting, and nothing pass. Do anyone have similar considerations or good practice advise getting Search Result data securely passed to a web form ? Alternatively, I have considered to only pass non-sensitive parameters e.g. the Random ID, Product names etc. and then based on that, populate sensitive date to fields in the web form based on a SELECT statement getting the data from the table where the results originate from. Any advise would be appreciated. Sincerely Ras
  18. Hi Vitalissssss, Thanks again for great help... This worked immediately! Very much appreciated. Sincerely Ras
  19. Hi, I've been fiddeling with preventing a submissionform to submit and I have seen a few solutions in the forum. However it seems i cant get those to work, perhaps because i try to rewrite them a bit to fit my purpose. This is what I am trying to achieve: I have two calculated virtual fields. These display the text WARNING if other fields exceed some values. (This works) If the two Virtual Fields display the warnings I want the form to prevent submission and high-light with alert the existing warnings. Below script prevent submission completely regardless if there are warnings in the virtual fields or not... and there are no alert either.: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { event.preventDefault(); var Input1 = document.getElementByName('cbParamVirtual1').value; var Input2 = document.getElementByName('cbParamVirtual2').value; if (Input1 === 'WARNING' || Input2 === 'WARNING') { alert('Enter acceptable volume!'); } else { document.forms["caspioform"].submit(); } }); </script> I would appreciate if anyone could point me in the right direction, getting the script to work. Thanks a lot in advance. Sincerely Ras
  20. Hi, Thanks a lot Vitalikssssss. Works perfect now, even with using dropdown yes/no. Sincerely Ras
  21. Hi, I am trying to get data from a table to a datapage calculated field based on conditions that are chosen in the data page.. I get to work without any CASE & WHEN conditions i.e. if I only have to SELECT from one column, but that only takes me halfway. Caspio continue to give me the ..... Incorrect syntax near (. and I have tried to rewrite many times. I would appreciate it a lot if anyone can see what im doing wrong in below statement! CASE WHEN [@field:Agree]="NO" AND [@field:Term]="Disc1" THEN SELECT Price FROM Products WHERE Model=target.[@field:Model] AND Color=target.[@field:Color] WHEN [@field:Agree]="YES" AND [@field:Term]="Disc1" THEN SELECT PriceReb FROM Products WHERE Model=target.[@field:Model] AND Color=target.[@field:Color] END Sincerely Ras
  22. Hi, Thanks.. you led me to the solution. It was the datatype in STF! I had to change it to number. Couldnt see the tree for the forest. Thanks again. Ras
  23. Hi, I have made a few conditions in a CASE statement in a Calculated value field in a submission form. The first part of the case statement works fine, but when the conditions ''in red'' is changed, a calculation error is stated for the last formular. The field [@field:STF] is showing in the form and contain value and is exact as other fields. I have a feeling the whole syntax is wrong when i have multiple conditions. I really appreciate if anyone have suggestions to correct the CASE statement (or if you believe the statement is correct as is) CASE WHEN [@field:Contract]="NO" AND [@field:Acceptance]= "YES" AND [@field:Terms]="F1" THEN ([@field:Rate]+[@field:HAND]*[@field:No_Of_Units]) WHEN [@field:Contract]="NO" AND [@field:Acceptance]= "YES" AND [@field:Terms]="F2" THEN ([@field:Rate]+[@field:HAND]+[@field:PAC]*[@field:No_Of_Units]) WHEN [@field:Contract]="NO" AND [@field:Acceptance]= "NO" AND [@field:Terms]="F1" THEN ([@field:Rate]+[@field:HAND]*[@field:No_Of_Units]) WHEN [@field:Contract]="NO" AND [@field:Acceptance]= "NO" AND [@field:Terms]="F2" THEN ([@field:Rate]+[@field:HAND]+[@field:PAC]+[@field:STF]*[@field:No_Of_Units]) END Sincerely Ras
  24. Jus to close it. Problem was solved by changing mind of workflow and focus on passing parameters to next page submission form (without use of virtual fields).
×
×
  • Create New...