Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    kpcollier reacted to NiceDuck in Importing Excel Files To Table   
    You may want to try checking the Web Services Integration (API) thingy. https://howto.caspio.com/web-services-api/
    However, its kind of complicated.
    Cant use it myself so I stick with multiple scheduled import and rely on the best practices they suggested: https://howto.caspio.com/tables-and-views/scheduled-import-and-export/scheduled-tasks-datahub/#:~:text=Best Practices,of high-speed data transfer.

  2. Like
    kpcollier reacted to Vitalikssssss in Task to send email with multiple records   
    Caspio Bridge 21.0 release brought a Tasks\Trigger enhancement which solve this case without complex Trigger\Tasks.
    There is a new block added to Triggered Action called "Table variable" which forms a table.
    You can insert table variable into email body and it will be formed link a table (HTML format enabled):

    Hope it helps someone.
  3. Thanks
    kpcollier got a reaction from roattw in Add Another or + to create multiple entries for a given field on Form   
    I tried to do this some time last year and couldn't figure it out. Obviously, it is not a standard feature (surprise) so it's gotta be something JS. When I was going through this, I initially was trying to just toggle hide/unhide the rest of the input fields with a button, but I couldn't figure out a good way to use a single button to loop through the rest of the input fields one by one. Another problem was removing the input fields if too many were summoned. (Maybe add another 'X' button by each field that when clicked, would hide the field?)
    I never finished this workflow and just went another way. But, one thing that might work is to have a JS script to toggle hide/unhide the first additional input field - then use the Rules section in the datapage wizard to hide the rest of the fields in such a manner that if the previous input field is empty, hide the next one. So, you would show the 2nd additional field with the click of a button... then when that 2nd field gets a value, the 3rd one pops up. You'll end up with the user leaving that space empty, but it may not be a huge inconvenience. Or if you don't care much you can skip the button altogether and just have the 2nd line show no matter what after the 1st line has a value. 
    Either way, I can't say I am surprised this isn't a standard feature, but it definitely should be. I bet I can take 5 minutes and find 5 examples of widely used forms on the internet that have this workflow. 
  4. Like
    kpcollier reacted to Farnsbarnes in Pivot tables, Calculated fields and HTML blocks   
    Many thanks for this kpcollier, really useful info.
  5. Like
    kpcollier reacted to SDDENR in Submission Form - Display hidden fields and prepopulate fields in tables   
    I just got back to this and started looking everything over - particularly where this "function displ()" was coming from.  In my footer on the datapage I had long ago commented out some old javascript code which was either used for testing or something.  After needing to re-embed the datapage due to the old embed code no longer functioning, this commented out javascript is what started to cause the issue.  I removed this javascript and everything works fine now.   
    Thank you for pointing me in the right direction by asking me to check the code for errors in the Chrome debugger - that is what found the culprit:)
  6. Like
    kpcollier reacted to geoffdude in Reject submission without proper flow   
    Can you provide a wire-frame of the flow that way we can see what's supposed to happen.
    Product = GARMENT X
    Serial Number = 123456
    Emp Id = TestID-00001
    Station = Choices (Station A, Station B, etc)
    Then create the wire-frame for us to look at ... like this example below, except show your form fields w/names and what should happen with it's use
    (It will help us to figure out the flow/logic.)

  7. Like
    kpcollier got a reaction from Leon13 in Webpage refresh forced upon clicking "update" button in Tabular Report   
    I believe this is what you need:
    <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { location.reload(); }); </script>  
  8. Like
    kpcollier reacted to geoffdude in Date Picker in iFrames Is Off Alignment   
    My first thought is you CSS in causing errors. The form CSS may be the issue .. but it's hard to determine without seeing the form live.
    Some things to try on the code you provided are as follows:
    <style> .ui-resizable-helper { border: 1px dotted gray; } ul#menu .activeMenu { background: #bb3033; } ul#menu { width: 100%; background: #21618C; font-size: 10px; font-family: "Arial", sans-serif; font-weight: bold; list-style-type: none; margin: 0; padding: 0; text-align: center; } ul#menu li { display: block; display: inline-block; margin: 4px 0 0 0; padding: 5px 15px 5px 15px; cursor:pointer;} ul#menu li a {color: #fff; text-decoration: none; display: block; line-height: 200%; } ul#menu li a:hover { color: #333; } /* FIX(1) move li styles here */ li { font-size: 11px !important; font-weight: bold !important; } /* FIX(2) get rid of padding, border, make width 100%, get rid of display block and position too, make background grey for testing only */ .content{width: 100%; height:1024px; background: #e5e5e5; padding: 0px; border:0px solid #21618C; overflow:hidden;} /* FIX(3) get rid of padding, make width 50% (iFrame width), make background blue (iFrame background color) for testing only */ .ChannelView{ width:50%; height:100%; margin-bottom:100%; background:#aae2ee;} /* FIX(4) disable this media query as it does nothing for this page @media (max-width: 1024) { .content { width: 96.6%; background: #ff0000 !important; } } */ </style>
     Let see what this style code change does, then go from there.
  9. Like
    kpcollier got a reaction from Morris in Hiring a database manager, what skills are needed?   
    You will definitely want someone that is proficient in JavaScript. That is a BIG one with Caspio. There are a lot of things that Caspio is missing in their 'standard' features, and they all seem to be do-able in JS. 
    HTML and CSS is pretty much a given. If they are good at JS, they'll know how to mess with these. 
    Python might be a nice asset for APIs, but again, someone good can do it with JS.
    Knowledge of some SQL will definitely help with expressions and queries for Calculated Values and Formulas, etc. But that stuff is easier and Live Chat can help with this a lot more than they can with JS.
    TLDR; You won't need as much of a 'Database Manager', but more of a 'JavaScript Expert'.
    A hard part is going to be getting an experienced developer wanting to actually work with Caspio. It is a great platform for people who are starting out and don't know much about programming, but for an expert, it could really be troublesome getting them onboard to work with something like this. 
  10. Like
    kpcollier reacted to Leon13 in Webpage refresh forced upon clicking "update" button in Tabular Report   
    Thank you @kpcollier !!  :)   Worked like a charm.  Greatly appreciate your help!
  11. Like
    kpcollier reacted to Vitalikssssss in Format Currency With Custom Calculations   
    Hi @kpcollier,
    Try the following JavaScript:
    <script type="text/javascript"> function formatAsDollars(el) { el.value = el.value.replace(/[^\d]/g,'').replace(/(\d\d?)$/,'$1').replace(/^0+/,'').replace( /\d{1,3}(?=(\d{3})+(?!\d))/g , "$&,"); el.value = el.value ? '$' + el.value : ''; } var fields = ["Subtotal", "MarkUp", "County_Tax", "Misc_Percent", "Freight_Total"]; //specify your fields here fields.forEach(element => { element = "InsertRecord" + element; // replace "InsertRecord" with "EditRecord" for Details/Single Record Update DP document.getElementById(element).onkeyup = function() { formatAsDollars(this); } document.getElementById(element).onchange= function() { formatAsDollars(this); } }); function calculate() { var subTotal = document.getElementById("InsertRecordSubtotal").value.length == 0 ? 0 : (parseFloat(document.getElementById("InsertRecordSubtotal").value.replace(/[$,]+/g,""))); var markUp = document.getElementById("InsertRecordMarkUp").value.length == 0 ? 0 : (parseFloat(document.getElementById("InsertRecordMarkUp").value.replace(/[$,]+/g,""))); var countyTax = document.getElementById("InsertRecordCounty_Tax").value.length == 0 ? 0 : (parseFloat(document.getElementById("InsertRecordCounty_Tax").value.replace(/[$,]+/g,""))); var miscPerc = document.getElementById("InsertRecordMisc_Percent").value.length == 0 ? 0 : (parseFloat(document.getElementById("InsertRecordMisc_Percent").value.replace(/[$,]+/g,""))); var freight = document.getElementById("InsertRecordFreight_Total").value.length == 0 ? 0 : (parseFloat(document.getElementById("InsertRecordFreight_Total").value.replace(/[$,]+/g,""))); var markUpTotal = document.getElementById("InsertRecordMarkUp_Total").value = (subTotal) * (markUp); var countyTaxTotal = document.getElementById("InsertRecordCountyTax_Total").value = (subTotal) * (countyTax); var miscPercTotal = document.getElementById("InsertRecordMisc_Percent_Total").value = (subTotal) * (miscPerc); var total = document.getElementById("cbParamVirtual1").value = (subTotal) + (markUpTotal) + (countyTaxTotal) + (miscPercTotal) + (freight); var dp_el = [ document.getElementById("InsertRecordMarkUp_Total"), document.getElementById("InsertRecordCountyTax_Total"), document.getElementById("InsertRecordMisc_Percent_Total"), document.getElementById("cbParamVirtual1") ]; dp_el.forEach(element => formatAsDollars(element)); } setInterval(calculate, 1500); </script> Regards,
  12. Haha
    kpcollier reacted to roattw in All of a sudden iPhones reporting "This version of Safari is not fully supported..."   
    Thx kpcollier.  My brain always goes direction that I screwed up some code somehow.  Will start referencing that Known Issues more.  I do think internally they would have a hot topic/issue awareness about that

  13. Like
    kpcollier reacted to Vitalikssssss in How Can I Format A Text Field As A Dollar?   
    Hi @bbewley, @kpcollier,

    You may try using this JS which should go to the Footer:
    <script type="text/javascript"> function formatAsDollars(el) { el.value = el.value.replace(/[^\d]/g,'').replace(/(\d\d?)$/,'$1').replace(/^0+/,'').replace( /\d{1,3}(?=(\d{3})+(?!\d))/g , "$&,"); el.value = el.value ? '$' + el.value : ''; } let fields = ["FIELD_1", "FIELD_2"]; //specify your fields here fields.forEach(element => { element = "InsertRecord" + element; // replace "InsertRecord" with "EditRecord" for Details/Single Record Update DP document.getElementById(element).onkeyup = function() { formatAsDollars(this); } document.getElementById(element).onchange= function() { formatAsDollars(this); } }); </script> Pay attention to comments.
    Hope this helps.
  14. Like
    kpcollier reacted to Vitalikssssss in Total * Markup * Tax in JavaScript   
    You can use the following JS code if you decide to use a custom code.
    <script type="text/javascript"> function calculate() { var subTotal = isNaN(parseFloat(document.getElementById("InsertRecordSubtotal").value)) ? 0 : parseFloat(document.getElementById("InsertRecordSubtotal").value); var markUp = isNaN(parseFloat(document.getElementById("InsertRecordMarkUp").value)) ? 0 : parseFloat(document.getElementById("InsertRecordMarkUp").value) ; var countyTax = isNaN(parseFloat(document.getElementById("InsertRecordCounty_Tax").value)) ? 0 : parseFloat(document.getElementById("InsertRecordCounty_Tax").value); var miscPerc = isNaN(parseFloat(document.getElementById("InsertRecordMisc_Percent").value)) ? 0 : parseFloat(document.getElementById("InsertRecordMisc_Percent").value); var freight = isNaN(parseFloat(document.getElementById("InsertRecordFreight_Total").value)) ? 0 : parseFloat(document.getElementById("InsertRecordFreight_Total").value); var markUpTotal = document.getElementById("InsertRecordMarkUp_Total").value = (subTotal) * (markUp); var countyTaxTotal = document.getElementById("InsertRecordCountyTax_Total").value = (subTotal) * (countyTax); var miscPercTotal = document.getElementById("InsertRecordMisc_Percent_Total").value = (subTotal) * (miscPerc); document.getElementById("cbParamVirtual1").value = (subTotal) + (markUpTotal) + (countyTaxTotal) + (miscPercTotal) + (freight); } setInterval(calculate, 1500); </script> Regards,
  15. Like
    kpcollier reacted to DefinitelyNot31337 in Task to send email with multiple records   
    With the recent Caspio Release 20, the features Variables and Loops on Triggers and Tasks should make this possible.
    This workflow is pretty advanced, the following are pre-requisites:
    1.) Auxiliary (aux) table
    2.) An Autonumber field in the table you would be selecting against. (Timestamps would also do, if they can be unique. But let's stick with autonumber. It's much simpler.)
    Below is a Trigger demonstrating this implementation.
    On an aux table, create an OnInsert Trigger, that:
    1.) Instatiates variables: a. init (min autonumber), b. len (max autonumber),  c.) ConcatText (placeholder of the concatenated Email text), d. counter (optional. To count the number of records involved)
    2.) Loops through the TABLE we are selecting against, whilst concatenating the involved records. The WHILE loop does magic tricks to select the next lowest autonumber per iteration.
    3.) Optional. Update the #inserted.EmailContent with the ConcatText
    4.) Actually send the email.

    This works well on my end. *Except for the counter part. Haha. I just added that last minute. I'm too occupied in making this post comprehensible. Sorry for my bad English. Kidding aside, the EmailContent works well on my end*.
    You can extend this trigger, perhaps, by:
    1.) Adding WHERE clause to limit your DataSets
    2.) Create a TASK to insert to this Aux table, therefore effectively creating reminders to your end-users.
    I hope this helps.
  16. Like
    kpcollier reacted to DarkRangerEX in Need help using Text255 Zipcodes in a triggered action   
    NEVER MIND. I figured it out. Fun fact, not all zip codes exist. Since I was doing an INNER join using a Zipcode/Latitiude/Longitude table, my triggered action would exclude data that didn't have a matching zip code in the joined table. Some of the random zip codes I came up with to test with simply weren't needed when allocating zip codes for the United States. Because of this, they were getting excluded from the join. So, there was, in fact, nothing wrong with the WHERE clauses or the triggered action, just the data I was using.
  17. Like
    kpcollier reacted to DesiLogi in Background color outside the Search forms and data tables   
    When I do an Inspect on the page it looks like cbOuterAjaxCtnr is where some of the whitespace comes from. When I manually type in a background color (in inspector) it does change the background. However, in the Style Sources if I put the below code it doesn't work and I can't find anything for cbOuterAjaxContainer. This is what I thought it would need: 
        background-color: #daded1 !important;
    Ah, I figured it out if anyone else needs to do the same thing: The background setting needs to not be in a Caspio datapage or Style but in the host web page's css. I guess the datapage uses whatever background css the host page uses for the headers and outer containers.
  18. Like
    kpcollier reacted to princezuko in Designated entry page in Authentication’s settings   
    Just want to give an example on this. If you have a Home page with a centralized login and you want all users to login from Home page, when they tried to open another page (e.g. Dashboard page), they will be redirected to your Home page.   Below is a use case.
    You have 3 web pages:
    1.    Dashboard page (dashboard.html). This has 5 DataPages deployed in it. There will be 5 login forms displayed on it. 
    2.    Profile page (myprofile.html). This has 2 DataPages deployed in it.
    3.    Welcome page (home.html). This has only one DataPage deployed in it.   You want all users regardless on from where they come from to see only one centralized login form (not 5 or 2), and you want all users to be redirected to your Dashboard page after login. You set up a “designated entry page” to be home.html, and “login redirection on success” to be dashboard.html.
    Then, when non-authenticated user opens dashboard.html, they will be redirected to home.html with one login form, and after successful login they will got redirected to dashboard.html. 
    If non-authenticated user tries to open myprofile.html, they will be redirected to home.html, where they will need to enter login information, and then they will be redirected to dashboard.html (as all users after successful login go to Dashboard page).
    If authenticated user opens any page, they will not be redirected and will stay on the page they opened.  
  19. Like
    kpcollier reacted to BethShaffer in Different Header Information When Search Returns No Results   
    Ha! I got this working.  I missed the step of having to name the ID for the No Results Message in Localizations.  If someone else needs to change the header message when no results are found, this is how.  I found some clues using this online help page, https://howto.caspio.com/integration/map-mashup/hiding-the-map-when-no-results-are-found/
    Go to Localizations and choose the language you're using, and go to #351 No Records Found. Add a custom message if there isn't already one, and put a div tag around it with an ID, mine is "norecord" for this example. Then add another div tag around the header content you want to change and also give it an ID, ID="HOW" for this example. Then add this code to the footer of your Configure Results Page Fields: Match whatever names you give the respective fields to the IDs in the code below. <script type="text/javascript"> if (document.getElementById("norecord")) { document.getElementById("HOW").innerHTML = "THE NEW CONTENT YOU WANT DISPLAYED WHEN THERE ARE NO RECORDS"; } </script> This new content will overwrite whatever content is in the <div> named HOW when the search returns no results.  If you're adding HTML to the new content, you need to escape all your quotes or it won't work.  I made that mistake.  In a link example, it would be:
    <a href=\"http://mywebsite.com\">Visit my website!</a>  
  20. Confused
    kpcollier got a reaction from onlinegenericmeds in Sending 'Yes' to Checkbox Parameter via Query String   
    Does anyone know how I can send 'Yes' through a query string value? 
    I have an anchor tag that I am using as a button to another datapage. I am trying to send 'Yes' as a parameter to check the box on the landing datapage. 
    EDIT* Live chat and I had a problem with one of the logic sections of a datapage that is included in this workflow. That is why we couldn't figure this out. If you want to send 'Yes' to a field through a query string, you need to use 'Y'.
  21. Thanks
    kpcollier reacted to carlJS in Sending 'Yes' to Checkbox Parameter via Query String   
    This also works by using 1/0. I prefer to use this one as Calculated Values in Yes/No fields only accepts these values.
  22. Thanks
    kpcollier got a reaction from mgredmond in Conditional DataPage Display   
    Hey @mgredmond,
    Check out this post. I think it'll help you out.
  23. Thanks
    kpcollier got a reaction from SunakoChan in Letter-Style DataPage   
    Yes I did! I used it with just a few CSS tweaks and it worked perfectly for my needs. It is what I am currently using. I appreciate it, @SunakoChan!
  24. Thanks
    kpcollier reacted to NiceDuck in Expiring Links/URLs   
    Hi @kpcollier,

    Im not sure if my understanding on your inquiry is correct but as I understand, you have a submission Form where you want it to be inaccessible after some amount of time. 
    for example, you have sent client a the link at october 1, this link should no longer be accessible by november 1. However, to those who got the link by october 30 should still be able to access the link by november 30. Is this the workflow you want?

     I think this could be done via JavaScript but I am not even adept to that, so what I will do is to use another datapage again. (sorry please dont cook me)

    However, since I do not know your full workflow is, there may come some complication. 

    My idea is to create a auto submit single update page  which will redirect you to the proper site if the condition is is right. else, It'll just send you somewhere else.  

    you may refer for this post about the different redirection:  

    However, instead of using the field for email, use the field for the URL where the you want to be redirected. 

    This will be the structure.

    1st, create a table containing the following fields: 

    Random ID
    Date sent
    Date receive

    Those person whom youll be sending the link should have a record already on this table for the field "Random ID" ,"Name", and "Date Sent".
    2nd, create a single update form that is determined by their ID which loaded through external parameters. The link you'll be sending to your customer should be the link for them to access this single update form.

    In this SUF (single update form, I'll use  acronym it because its long)  make a virtual field and set it as a calculated field. In here, you will have to make Condition statement in it with some date diff functions. Kinda like this

     WHEN  DateDiff(day, [@filed:Datesent], SysDateTime())  > 30
     THEN "www.yourdestinationURL.com"
     ELSE "www.somewhereelse.com"

    Then, you have to create a HTML block containing this JS code:

    <script type="text/javascript">
      if(document.getElementById("caspioform")) {
      document.getElementById("caspioform").style.display = 'none';
      setTimeout('document.forms["caspioform"].submit()',10); }

    -------------- this code will make your SUF auto submit

    finally, on the end of your the wizard, set it to redirect  to a new page and use the field picker to insert the "[@field:virtual1]"

    then click finish. 

    the URL you have to send to your clients now are URL for this SUF along with their random id as the parameter. 

    However, this again will consume a datapage. Please dont cook me Im a niceduck not a tasty duck   I wish you atleast have the idea. Im not confident with my english since im kinda starving right now, might be affecting my thinking...
    anyway, I hope this helps you. 


    P.S. You may also explain your desire a bit more further and let see what else we can do. I dont know Javascript though.
  25. Thanks
    kpcollier reacted to Ed727 in Back button in Multi Step Form   
    Another way to try it...
    If you didn't want the first form to actually make a submission to your table, you could set up that first form as virtual fields an then pass the entries to the second form as parameters.  The second form would then receive those parameters and enter them into the actual entry fields, which you'd hide (since the user has already "entered" them in the first form).  When the user fills out the new fields he/she sees in the second form, the entries for both the first and second form are then entered into your data table in one go.
    To enable a user to go back to the first form prior to submitting the second form, create the back button as an actual link back to the first form, (or try the back button javascript) and set up the first form to also receive parameters so that it "catches" the same parameters it sent to the second form.  This then pre-populates the fields in the first form with the info the user already put in.
    One complication is ensuring that that you don't run into a situation where old parameters are sitting around and appearing in the first form's field uninvited.  You can use the ?cbResetParam=1 when first directing the user to the first form, which will clear any parameters before the user sees the form.  However, if you do this, the link from the second form to the first form will need to be a url link that doesn't have this parameter clearing instruction.  If you use the javascript "back" button, it's the same as hitting the browser back button and the first form page url will still have the ?cbResetParam=1 which will clear the entries.
    I have not tested this approach for your use, but I've used a similar setup for another purpose. 
  • Create New...