Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 04/05/2019 in all areas

  1. 3 points
    Hello I want to share something with you guys again. Back then when I only have an 'explore plan', I'm using this workflow to send acknowledgement/notification emails on different persons base on a value of a field in my submission form. My workflow back then is I have a submission form for job applicants. I want to send an email to a certain member of my company depending on which position the applicant is app laying. for example. If the applicant is applying for a staff position, there will be an email an email send to staff manager, If the applicant is applying for an agent position, there will be an email an email send to agent manager. etc... This could easily be done via trigger but since it was unavailable on explore plans. This is what I did. First I made a lookup table containing the emails of the designated managers where I used the job they are managing as a unique field. Then on my submission form. I made a virutal field and set it as a cascading dropdown that is using the field for the position the user is applying for as a parent field and used the table containing the emails of the managers as a lookup table. I enveloped this virtual field with html blocks with html codes for hiding fields. please see this documentation for reference : https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/ and https://howto.caspio.com/datapages/datapage-components/cascading-elements/ . Now that it was hidden, we will now proceed to the messaging options. It is up to you to chose if you want an Notification emails or Acknowledgement emails. As I check It works with any of them as long as you are going to use the virtual field with cascading value as the field reference for email. It will now send an email on different person depending on what job the user is applying to. I hope it helps anyone. Also please comment if you have a better idea. Quack
  2. 3 points
    Hello @TroubleShooter, Yes, you can. Currently, it is only possible with JavaScript. The idea is to place the Registration Form and Standalone Login Page side-by-side (or at least, in the same page). You may hide the Login Form ( using <div style="display: none;"></div> on the Header/Footer of the DataPage || More about here...), on your Registration Page but I rather keep them visible so the users can opt to just log-in if they already have an account; or register, if they don't. After registration, JavaScript will fill-out the login form, and submits it programatically, therefore logging-in the newly registered user. The only requirements to this implementation are: 1.) Login DataPage and Registration Form DataPage are deployed on the same page. 2.) Both DataPages are AJAX-Enabled! 3.) Headers/Footers should have the HTML Editor disabled from the Advanced tab. Without futher ado, let's do this. 1.) Open DataPage Configuration for your Registration Page: 2.) Go to 'Configure Fields Section' 2.1.) Add a Header and Footer (Disable HTML Editor from the advanced tab) 2.2.) Paste the code snippet in the Footer and modify the following information. <script> document.addEventListener('BeforeFormSubmit', function() { var registrationDP = "[@cbAppKey]"; var loginDP = "378fd3458dfsjhefjhqerwfdsyui3274239"; //Replace with the AppKey of your Standalone Login Scren var username_field = "username"; //replace with the name of your username field (CASE SENSITIVE!) var password_field = "password"; //replace with the name of your password field (CASE SENSITIVE!) //No modifications necessary from this point onward. document.querySelector(`[action*="${loginDP}"] [id*=xip_username]`).value = document.querySelector(`[action*="${registrationDP}"] [id*=InsertRecord${username_field}]`).value document.querySelector(`[action*="${loginDP}"] [id*=xip_password]`).value = document.querySelector(`[action*="${registrationDP}"] [id*=InsertRecord${password_field}]`).value }) </script> 5.) Go to 'Destination and Messaging' 5.5) Set Destination after record submit to: Display a message; Disable the HMTL Editor! 5.6) Paste the code snippet below; then modify. Registered Successfully. <script> var loginDP = "378fd3458dfsjhefjhqerwfdsyui3274239"; document.querySelector(`[action*="${loginDP}"]`).submit(); </script> After saving, you should be good to go. Working example: https://stage.caspio.com/support/forums/DefinitelyNot31337/register-login/index.html Application Export Package: CaspioData_2019-Apr-02_0219.zip Good luck and happy hacking! Regards DN31337!
  3. 2 points
    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. Vitalikssssss
  4. 2 points
    Please ensure that you don't have referential integrity enabled in you table relationship. According to the note in https://howto.caspio.com/tables-and-views/triggered-actions/:
  5. 2 points
    Hi @roattw If this is a submission form I assume you mean something like this; Where you can have headings over each section? If so you can split the form up into sections with columns to suit and have HTML block in-between their own sections set at 1 column to span the page like this; This is one column proceeded by the HTML block with the next section containing the submission form fields; You will have to experiment (a lot!) to get decent results and spacing for your whole form as if you start mixing section columns other then 1 and X (in my case X = 5) it will space them to overcome this I either used columns of 1 or 5 and if required less then 5 used 1 and had the elements continue on the same line. Your other option would be to build a full HTML table within the HTML block something similar to this; <style> .wrapper { background-color: lightgray; padding: 5px; } td { padding: 10px; } </style> <table border="0" cellpadding="1" cellspacing="1" style="width:100%;"> <tbody> <tr> <td><strong>Some Data 1</strong></td> <td><strong>Some Data 2</strong></td> <td><strong>Some Data 3</strong></td> </tr> <tr> <td class="wrapper">[@field:Some_Data_1]</td> <td class="wrapper">[@field:Some_Data_2]</td> <td class="wrapper">[@field:Some_Data_3]</td> </tr> <tr> <td><strong>Some Data 4</strong></td> <td><strong>Some Data 5</strong></td> <td><strong>Some Data 6</strong></td> </tr> <tr> <td class="wrapper">[@field:Some_Data_4]</td> <td class="wrapper">[@field:Some_Data_5]</td> <td class="wrapper">[@field:Some_Data_6]</td> </tr> </tbody> </table> Which would result in something like; Again you would have to experiment with layout to match the rest of your form/fields but may be a possible solution but without seeing exactly what you want as an end result its a bit hard to offer any further advise. Good luck, Roosta
  6. 2 points
    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>
  7. 2 points
    You can use the code below as a reference. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var c_checkbox = document.getElementById("selectAll") ; var elementID = event.detail.uniqueSuffix; function c_event () { if (c_checkbox.checked) { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.length; i++) listBox.options[i].selected = true; } else { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.length; i++) listBox.options[i].selected = false; } } c_checkbox.onclick = c_event; }); </script> Add this in your search's footer with the HTML editor being disabled. Just make the necessary changes for your form elements' ID attribute. You may use this guide for that.
  8. 2 points
    Hello Batchini! Well, there would be two ways how to create this. If we're going to use trigger, this may be a complex one. One easy way I thought of is with the use of Calculated Fields, but this would only be on a DataPage Level. You can use this formula to get the Minimum Value. SELECT MIN(FieldName) FROM Child WHERE ID = target.[@field:FieldID] Assuming if you have a foreign Key inside your child table. So we'll be using this formula to display the minimum value, Datasource would be your parent table. I hope this helps. Scar();
  9. 2 points
    Hello @TroubleShooter, The reason why the ampersand symbol is being cut is because Caspio renders the link literally. In this example: <a href="https://www.google.com?myParameter=[@field:someField]"> Link </a> If "someField" evaluates to "Some Value & Another Value" then the mark-up would result to <a href="https://www.google.com?myParameter=Some Value & Another Value"> Link </a> This is when urlencoding comes into play. What this does is substitutes the special characters in a standard HTML format which interprets characters a different way. You may try using my code snippet below. 1.) Just replace the link ID with the id attribute of your link. 2.) repeat the addParameter function as needed. The first argument is your parameter name, and the second argument is your field value. <a href="#" id="link-1">MyLink</a> <script> // DO NOT TOUCH FROM THIS POINT var params = []; addParameter = function(qs, val){ params.push(`${qs}=${encodeURIComponent(val)}`); } //UP TO THIS POINT var link_id = "link-1"; var base_url = "https://SomeDomainFrom.caspio.com/dp/926560as124321324dasd00a6523f123123624543123423fc0453b9093"; addParameter('boo', '[@field:SelectedAction]'); //repeat as needed addParameter('far', '[@field:SelectedAction]'); // DO NOT TOUCH FROM THIS POINT var queryString = params.join("&"); document.querySelector(`#${link_id}`).href = `${base_url}?${params.join("&")}` //UP TO THIS POINT </script> Works for me. -DN31337!
  10. 2 points
    I suggest using Print.js. With Print.js you can target the specific id of the element that you wanted to print out as a PDF. More info on the link here: https://printjs.crabbly.com/
  11. 2 points
    Hi @philippe, You can use Javascript for this. First, you need to pass the parameter from the search form. Then inside your Results Page, add a Header and Footer. Put this code inside your footer (make sure to disable HTML Editor) <script> // Replace Value to Parameter name var passID = '[@Name]'; // Replace Value to the Field Name of Event ID inside table var this_field= 'Name'; var insert_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd' + this_field); insert_field.value = passID; </script> Just a little something I learned from this post: Thanks Mahfriend Sample Page: https://c0acd927.caspio.com/dp/e6cb6000e2c14d25606f4cd1ae1b I hope this helps. Glitch.
  12. 1 point
    One solution for this is to have an "Other" option in your field and a new field (text element) where your user can type and will hold a value for the "Other" option. The new field can be hidden at first and will just show once "Other" is selected using Rules. If you want the new field's value to be copied in the first field upon submission, you can use trigger for that. Here is a documentation: https://howto.caspio.com/tables-and-views/triggered-actions/
  13. 1 point
    LittleMsGinger

    Check if File Field is Blank

    Hi @IamBlossom, For File DataTypes, you need to use SQL's "DATALENGTH" to measure if the field has content or not. It is a behavior that NOT NULL or IS NULL will not work for File Datatype. Use this instead: CASE WHEN DATALENGTH([@field:Images]) = 0 THEN 'No image attached' ELSE 'Image available' END Hope this helps!
  14. 1 point
    I had such an issue and 'Use display value on DataPages' worked for me. For some reason it is unchecked by default
  15. 1 point
    Can you provide a wire-frame of the flow that way we can see what's supposed to happen. Like: 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.)
  16. 1 point
    Thank you @kpcollier !! :) Worked like a charm. Greatly appreciate your help!
  17. 1 point
    Hi @norkaman Do you use the following syntax to reference first 2 parameters? [@WID] and [@LBE]? Regards, vitalikssssss
  18. 1 point
    Hi @Yusuf, I suggest that you review this forum post: I tried this solution on my end and it works!
  19. 1 point
    @AtayBalunbalunan, Thanks for your reply. I am deploying the Datapage on a self hosted WordPress website. I've tried it both using the Embed and WordPress (with plug-in) deploy methods. I tested the direct link in Firefox, I did see the authentication fields. I then tried the page on Microsoft Edge and that worked. On a whim, I decided to try it again on Firefox and now the fields display! I really don't know how to explain it, but it probably has something to do with cache and/or cookies, which I did clear when previously testing. I guess as long as it continues working it will be one of the great unsolved mysteries. Thanks for you assistance!!
  20. 1 point
    AtayBalunbalunan

    Page does not exist

    This may happen after your application has been renamed. Other users of your account might have renamed your application before you navigate to the application's DataPages.
  21. 1 point
    You may try adding an HTML Block with the following. <style> table[class^="cbResultSetTable"] { display: none !important; } <style> Please disable HTML editor first.
  22. 1 point
    AtayBalunbalunan

    Set Date to Null or Empty

    One solution to this is using a Calculated Value as the form element with this formula: CAST(null as datetime) If you wish to hide this field, you may use HTML Blocks: https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/
  23. 1 point
    AtayBalunbalunan

    Preview HTML email in trigger

    Have you tried clicking the “maximize” icon?
  24. 1 point
    Hi @RickManolo, Well, for me the easiest way to do this is to use a Virtual field to display "Notes" and make an actual field "Notes" as hidden. I assume that you use Single Record Update or Details Datapage. If the answer for above is yes, you can use the following JS code to concat existing Note with AddNote input after Update of the record. <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function (event) { let target = document.querySelector('[id*="EditRecordNotes"]'); let n_notes = document.querySelector('input[id*="EditRecordAdd_Note"]').value; let o_notes = document.querySelector('input[name*="cbParamVirtual1"]').value; target.value = o_notes + n_notes; }); </script> Change the name of the fields if necessary, and also make sure you disable HTML editor prior to pasting the code. Hope this helps. Regards, vitalikssssss
  25. 1 point
    kpcollier

    Make JS Work With Empty Fields

    Haha, wow. Your code looks SO nice, specially compared to the way I did it. Thank you @Vitalikssssss it works great.
  26. 1 point
    The value for X should be in the Default Value field under Field Options.
  27. 1 point
    Hello, Thank you for the response Shiro and Vitaliksssss. I just want to share what I did to resolve this issue. Instead of using the Caspio's default delete functions, what I did is I added a erase field which is a yes/no filed on my records and I created a trigger that will delete those records with 'yes' values on these fields. since the record is updated instead of deleted, the datapage will be able to capture the authentication fields first before the trigger delete the record. I will simplify my workflow as this check the yes/no field assign for deletion --> update the record --> record is updated/inserted on the table --> trigger will check for records with a 'yes' value on its erase field --> delete those records. This works on inline edit, bulk edit and details pages. However, if you deleted a record from Caspio Bridge, it will not be recorded on your history log. Hope this helps anyone. quack.
  28. 1 point
    Thank you Alison this is great help. Jared
  29. 1 point
    Hello Im really excited of caspio I just find it fev days ago. I building job posting website (members based) I need advice if all of this I can do it with caspio? I got already builded websit in html working online. I need to make customers registration and login and trades registration and login. When trade person loggs in then will have members area website, with update details upload photos change password. For customers I need them to be able post jobs - they fill the form and submit and this post apears in specific place on my website. Its possible to do all of this with caspio? thanks Simon
  30. 1 point
    Vitalikssssss

    Line Chart time series

    Hi @Corpcatalog, You can build such Chart in Caspio but you would need to modify your table first. You table should look like the following: You can build the following Chart once you transform your table: You may import attached Datapage to your account in order to see the settings for the Chart Datapage. Hope this helps. Regards, vitalikssssss CaspioData_2019-Sep-10_1309.zip
  31. 1 point
    I want to share a solution on how to set a placeholder to the Multiselect Dropdown form element on the search form. You should put the following code into the Footer after disabling HTML Editor on the advanced tab: <script> document.addEventListener('DataPageReady', function () { document.querySelector('[id^="ComboBoxValue"]').setAttribute("placeholder", "Your value for the placeholder"); }); </script>
  32. 1 point
    Barbie

    Bar Chart X-Axis Value

    Hi @taylorswiftlover, For you to be able to achieve your workflow, you need to add another X-axis on your Chart DataPage. Please refer to the screenshots: 1. Choose the 'Use a separate field for each series' in the Data Source settings: 2. Add another X axis: 3. Change the Formatting of your X-axis: Hope this helps. - Barbie
  33. 1 point
    Glitch

    Highlight Previous days

    Awesomesauce. Thanks @DefinitelyNot31337!
  34. 1 point
    It does require a login as it has security. I will post again in a bit to provide you access. Thanks
  35. 1 point
    Glitch

    Ticketing System

    Hi Scarlet, I figured out a way to do this on trigger. The idea is, you'll prevent using two DataPages since the Timestamp is being generated from the trigger. This is a sample trigger you can use. So upon update, you can update the #inserted Start time if the technician (which in your case is the ticket handler), has been changed. And update the #inserted EndTime if the #inserted Status is closed. The case when statement there, is to update the fields only if the respective fields has been changed. Works like a charm. Hope this helps, Scar. Glitch ();
  36. 1 point
  37. 1 point
    LittleMsGinger

    Phone number Formatting

    Hi @jafranklin77, I found another forum post that is quite similar to your inquiry. You can check it here: Thanks. -kristina
  38. 1 point
    SinJunYoung

    Standard PDF Feature

    This article provides elaborate demonstration for the PDF Report function of Caspio. Note that this is only available in the Reports and not in the submission form. Selecting as Download Options PDF download option is available in all Report DataPages, including Pivot Tables and Combined Chart and Reports. This option allows your app users to download the displayed Report DataPage as a PDF file. You can also find this information from one of the Release notes article: https://howto.caspio.com/release-notes/caspio-bridge-13-0/ Customization If your PDF is enabled as a Download option, you can actually set and customize it according to your preferences. Just click the icon beside it to check the default configuration of the PDF.
  39. 1 point
    @Scott Hello! Your trigger should consist of two part. First one will insert the entry into the log table if the log table does not contain the ID of a particular entry. The second will update the needed entry if it is already present within the log table. Please find the app with the example attached : FORUM_Trigger_Insert_Update_Based_on_Presence_1_0_2019-Jun-19_0714.zip
  40. 1 point
    kpcollier

    JS Animation to Flip Image

    Cancel that. I changed the classes to IDs with a number and changed QuerySelectorAll to ElementById and it all works. Thanks again Alison.
  41. 1 point
    Hi @kpcollier, You can use triggers to insert 3 lines in a new/existing table on an insert action in a table. For calculating total cost estimates, you can use a report. I hope that helps.
  42. 1 point
    Try this: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { event.preventDefault(); var x = document.getElementById('InsertRecordDOM').value; if (typeof x === 'number' || (x%1===0)) { alert('This form only submit alpha characters!'); } else { document.forms["caspioform"].submit(); } }); </script>
  43. 1 point
    JolliBeng

    Submission

    Hi @Role21, You can achieve that by deploying your report DataPage as an iFrame, then deploy it the footer of your Submission Form. Set the Destination of your Submission form to "Same Form" and disable the AJAX loading. The output should look like this: -JolliBeng
  44. 1 point
    - wrong post. please disregard Thank you
  45. 1 point
    UPDATE Here's the link where you can submit a form to consult to their Professional Services team: https://www.caspio.com/services/professional-services/
  46. 1 point
    JolliBeng

    Totals

    Hi @Jess147, You can achieve that workflow using triggered actions. But first, the records that needs to be calculated should be saved on your table. I suggest that you use Formula fields for calculations or directly calculate it under your triggered actions. You may refer to the following links: https://howto.caspio.com/tables-and-views/data-types/formula-fields/ https://howto.caspio.com/tables-and-views/triggered-actions/ -JolliBeng
  47. 1 point
    jimarch

    Filestor URL for Image

    Yes, this is exactly what I was needing!!!
  48. 1 point
    Hi @kpcollier, You can check the status before the update to make sure it is not equal to the list of previous statuses. Here is an example for one of the Trigger blocks: Hope this helps. Regards, vitalikssssss
  49. 1 point
    So you might end up with 9000 records in that table over a year - my main table has 365000 records, so I dont think it will cause a problem for performance. Ok I think you should create a view that links the two tables together using the Job number - then you can create two reports from the one view. The first will show the Orders not completed, by selecting only the fields form the Ordering table and the 2nd will show the Completed orders. Then embed both tables into a details page which passes the Job number as a parameter to both embedded tables.
  50. 1 point
    Thanks douvega. I suspected it might come down to using API calls. However, while I understand the Caspio codes and explanations as presented, I just can't get my head around actually putting the explanations together to make a basic API call. If only Caspio had a step-by-step example of the simple operations required to have a GET View Rows up and running (a video would be good). This is such a big and obvious gap in Caspio's explanations that I can't help suspect it's purposely done! Do you know of any such help anywhere? I appreciate the 3rd party recommendation. Perhaps for later, as I'm on a bit of a shoestring budget at the moment. Thanks
×
×
  • Create New...