Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    kpcollier got a reaction from Alison in 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.
  2. Thanks
    kpcollier reacted to Glitch in Adding a Prefix with Calculated Value   
    Hi there,
    Are you doing this formula using a Calculated Field?
    I think you need to convert the Virtual field first as a character.
    I tried this on my end and the formula worked!
    '2-' + CAST([@cbParamVirtual1] as VARCHAR)
    I hope this helps.
  3. Like
    kpcollier reacted to Alison in JS Animation to Flip Image   
    Hello @kpcollier,

    You should add a variable declaration for the img tag. This will allow you to assign styles to it.

    Feel free to use the following JS code:
    function Displayer(n) { var check = document.getElementById('Section' + n); var image = document.querySelectorAll('.estimatebuttons' + n)[0]; if (check.style.display == 'none') { check.style.display = 'inline'; image.style.transform = 'rotate(180deg)'; } else { check.style.display = 'none' image.style.transform = 'rotate(0deg)'; } }  
  4. Like
    kpcollier got a reaction from Meekeee in Count Number of Fields In Table   
    Perfect. Thank you!
  5. Thanks
    kpcollier reacted to Meekeee in Count Number of Fields In Table   
    Hi @kpcollier,
    You can do this by going to your tables and check the "Fields" from the gear like Setting. Here's a screenshot:

    I hope it helps!
  6. Like
    kpcollier reacted to Jan in Conditional Autonumber   
    Hi Sergio,
    I am sorry for delayed response.
    You can try doing the following steps:
    For example, names of Fields:
    Id - the name of "ID" field;
    "Project" - the field with name of "Project", if you use this field;
    "UniqueReference" - the field for Unique Reference.
    1) Create a Single Update Form:
    1a) On the "Record Identification" step, in the field "Parameter name:" enter like:
    1b) On the "Select Fields" step, select your "Project" and "UniqueReference" field (if "Project" is used);
    1c) On the "Configure Fields" step
    1c*) Set "TextField" Form element for "Project" and "UniqueReference" fields;
    1c**) Add a Header&Footer element, select the Header element, click the "Source' button" enter the following code:
    <div align="center"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div>
    1c***) Select the Footer, click the "Source" button and enter the code like following:
    <SCRIPT LANGUAGE="JavaScript">
    var position1 = document.getElementById("EditRecordProject").value;
    var position2 = "[@InsertRecordID]";

    var allpositions = "IR-" + position1 + "-" + position2;

    document.getElementById("EditRecordUniqueReference").value = allpositions;

    if(document.getElementById("caspioform")) {
    document.getElementById("caspioform").style.display = 'none';
    setTimeout('document.forms["caspioform"].submit()',1000); }
    If you do not use the "Project" field, you can use the following code:
    <SCRIPT LANGUAGE="JavaScript">
    var position2 = "[@InsertRecordID]";
    var allpositions = "IR-ProjectName-" + position2;
    document.getElementById("EditRecordUniqueReference").value = allpositions;

    if(document.getElementById("caspioform")) {
    document.getElementById("caspioform").style.display = 'none';
    setTimeout('document.forms["caspioform"].submit()',1000); }
    I have marked names of fields. Please make sure that you enter names of your fields.
    2) Edit your Submission Form.
    2a) On the "Select Fields" step, check the "On exit, pass AutoNumber ID field as parameter" checkbox. It is under the "Available fields" section.
    2b) On the "Destination and Emails" step, select
    - if you use Embed Deployment: "Go to a new page" and enter the URL of the page where the DataPage from step 1 is deployed;
    - if you use iFrame or URL Deployment: "Go to a new DataPage" and select your DataPage.
    Now, when a new record is added, the Autonumber is passed as parameter to Single Update Form. On this form Unique Reference is created, entered to the field, and the form is autosubmitted. A user sees "Process" instead of the Single Update Form.
    I hope, it helps.
    Fell free to ask, if anything is unclear.
  7. Sad
    kpcollier reacted to Alison in Work Around Solution for Printing Reports   
    Hello @kpcollier,

    PDF download option is included into the Build plan and higher. Please follow this link for more details: https://www.caspio.com/pricing/basic-plans/

    Also, you can use WebMerge Zapier integration with Caspio: 
  8. Thanks
    kpcollier reacted to DefinitelyNot31337 in Login after User Registration   
    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!
  9. Thanks
    kpcollier reacted to WatashiwaJin in Move Buttons to Side Of Search Box   
    Hi @kpcollier,
    As I said in the earlier response, you just need to adjust the margin of the style for your div. 

    This is the result: 

    Check it out here: https://c1abv183.caspio.com/dp/482760006540f98089034387a563
  10. Thanks
    kpcollier reacted to DefinitelyNot31337 in Pull Records in Separate Tables For Report   
    hi @kpcollier,
    I believe what you want is a UNION of both tables, and NOT a VIEW. Here's a good article differentiating the two:
    Unfortunately, Caspio does not have a direct table operation that allows UNION of both tables. The closest we can do is to create another table that has the common fields of your first two tables. We can, then populate the new table with Triggered Actions or Tasks to yield your desired result. After, then, just use the new table as your DataSource.
    I hope this helps.
  11. Thanks
    kpcollier reacted to DefinitelyNot31337 in Highlight Date In Tabular Report - Not Entire Row   
    Hi @kpcollier
    Try this solution: 
    1. Add a Calculated Field with a syntax similar to this one.
    CASE WHEN DATEDIFF(day, [@field:date], '[@cbTimestamp]') >= 21 THEN 'Expired' END  
    2. Add an HTML Block with this Syntax
    <span custom-data="[@calcfield:1]">[@field:date*]</span>  
    3.) Easily style this HTML Markup in your Styles (CSS Rules). I'd suggest, in the header:
    You can post this everywhere you want:
    <style> [custom-data="Expired"] { background-color: red; } </style>  
    Hope this helps.
  12. Like
    kpcollier got a reaction from DefinitelyNot31337 in Getting a search box to keep cursor after search is clicked.   
    @jnordstrand, have you tried enabling 'Automatically focus cursor on first field'?

  13. Like
    kpcollier reacted to WatashiwaJin in Move Buttons to Side Of Search Box   
    Hi @kpcollier,
    You can try to add and customize the button style for you to be able to do that.
    For Example, you can try this similar workflow:
    Add this code in the header of your search form:
    <style> input[type="button"] { background-color: #008CBA; width: 150px; color: white; padding: 5px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; } #customstyle { position: fixed; padding: 24px 3px; margin: -69px -10px; cursor: pointer; } </style> Then insert an HTML Block in the very bottom of the search form  to add this code:
    <div id="customstyle"> <input type="button" value="Go to Google" onclick="window.location.href='https://google.com/'" /> </br> </br> <input type="button" value="Caspio site" onclick="window.location.href='https://caspio.com/'"/> </br> </br> <input type="button" value="Check YouTube" onclick="window.location.href='https://youtube.com/'"/> <div> Important note:
    - Add the button(s) (HTML Block) in the very last part of the form.
    - Check "Continue next element on the same line" in the advanced option of the field before the HTML Block where the button is located:

    - Make sure that you unchecked the "Enable HTML editor" in the advance option of your Header and HTML Block.

    - This is a custom CSS code and adjustment/configuration might not be compatible in your current search form so you will need to change the (padding and margin) to adjust them.
    You can check the result here:
    I hope this helps
  14. Haha
    kpcollier reacted to AtayBalunbalunan in Another Restaurant Hours Check Question ...   
    Here's the link where you can submit a form to consult to their Professional Services team: https://www.caspio.com/services/professional-services/
  15. Thanks
    kpcollier reacted to DefinitelyNot31337 in Checkbox In Search To Include Additional Results   
    Think of 'action' as your 'Tech Status'.
    > By default, it will not return a 'Tech Status' of Completed
    > You can add another criteria for 'Tech Status' to filter with other values as well
    > The only time Tech Status = 'Completed' will be returned is if Criteria Two is checked, or if other criteria were satisfies such condition
  16. Like
    kpcollier reacted to Vitalikssssss in Checkbox In Search To Include Additional Results   
    Hi @kpcollier,
    I believe you can switch the comparison operator for "Tech_Status" to "Not Equal".

    Hope this helps.
  17. Like
    kpcollier reacted to WatashiwaJin in Center Pop-up window   
    Hello @FinTheHuman,
    You can try to use this custom code to center your pop-up window:
    <script language="javascript" type="text/javascript"> function OpenPopupCenter(pageURL, title, w, h) { var left = (screen.width - w) + 1350; var top = (screen.height - h) / 10; var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', left=' + left +', top=' + top); } </script> <button onclick="OpenPopupCenter('http://www.google.com', '', 800, 1000);">Go to Google</button> You can change the following data in this line of code:

    You can try this sample URL for testing: https://c1abv183.caspio.com/dp/482760007ae3812e935c495e9514
    I hope this helps  
  18. Like
    kpcollier reacted to Vitalikssssss in 'Freeze' Field When Given A Value   
    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.
  19. Like
    kpcollier got a reaction from Becca37 in How To Use Application Parameters in TASKS?   
    I'm actually trying to do the same thing. I'll let you know if I have any luck. Also sticking around here in case a solution pops up 
    *I was told that this is not part of the functionality yet with Tasks. They came out with the Caspio 15.0 update, so it is pretty new... But I guess Tasks can only pull data from Tables and not App Parameters yet. 
    You can put a recommendation into the Caspio Ideabox. I would, but I'm already out of votes to add more ideas. 
  20. Like
    kpcollier reacted to JolliBeng in Text Field   
    Hi Role21,
    Yes, you can do that. 
    You can add this code on your DataPage header:
    input#EditRecordID {
    pointer-events: none !important;
    Just change "EditRecordID" to your field ID.
  21. Like
    kpcollier reacted to skyflare1 in Formatting SearchForm Number as Phone Numbers w/ Hyphens   
    Update - Issue fixed!
    I had inserted the code into the footer of "Configure Results Page Fields" but not the "Configure Search Fields" footer. Problem solved and it is now working beautifully. 
  22. Like
    kpcollier reacted to Harbinger in Styling tables   
    Just to add, in case you want a fully customizable style, you can go to the Styles as what KPCollier instructed, then go to the source and look for the tr tag.
    From there you can add CSS codes to customize your table's attributes.
  23. Like
    kpcollier reacted to Corpcat in Two Tables, One Report, One Search Form   
    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. 
  24. Thanks
    kpcollier reacted to TsiBiRu in Client Database Configuration   
    Hi @kpcollier,
    To test if the code is working, I would suggest to look in the URL and see if the parameter contains a value.
    If it has a value, then it only confirms that there is nothing wrong with your code. We just need to fix this on the receiving part and ensure that we are receiving it using the exact variable name [@val] in this example

    In regards to your second question, you will simple need to add a new HTML block to and create a new/2nd drop-down
    <!-- As you can see, I've added '2' in my id below id='2[@field:Listing_ID], this is to diffrentiate it with our first dropdown so that we can target it correct using its repective id. To make it simple, 2 is just a prefix to indicate that it is the second dropdown of the row ex: id of row is 2 first drop-down ID:2 second drop-down ID:22 and ... --> <select id='2[@field:Listing_ID]'> <option value="[@field:Address]">[@field:Address]</option> <option value="[@field:Address_Line_2]">[@field:Address_Line_2]</option> </select> Then we will just need to add some code in our JS to capture the selected  value of our second value, and to add it to our query string
    <button type="button" onclick="myFunction([@field:Listing_ID])">Click me</button> <script> function myFunction(x) { // Getting the value of the first drop-down var e = document.getElementById(x); var strUser = e.options[e.selectedIndex].value; // Getting the value of the second drop-down var f = document.getElementById('2'+x); var endUser = f.options[f.selectedIndex].value; window.location.replace("https://www.google.com?val=" + strUser + "&val2="+endUser ); } </script>  
    I've also added in this response a copy of the DataPage that I've updated, it now contains two drop-down per row/record.  And the selected value of this drop-downs is being passed to my test site (google.com). You can download it to your account so that you can review the code, and see how it works
    if you will be encountering some issue implementing this solution, you can just provide me with an exported copy of your Datapages (Sending & Receiving) so that I can help you to implement this.

    Kind regards,
  25. Like
    kpcollier got a reaction from DefinitelyNot31337 in List Report Styling   
    This worked! Thanks a ton, @DefinitelyNot31337.
  • Create New...