Jump to content

Mathilda

Caspio Rockstar
  • Content Count

    464
  • Joined

  • Last visited

  • Days Won

    49

Posts posted by Mathilda

  1. On 3/23/2017 at 5:11 PM, jeffs88keys said:

    I would like to present a report that returns the 5 most recent sales entries for any user.

    Each sales entry is assigned an autonumber field "booking_number".  For an authenticated user, I'd like the report to return the 5 most recent "booking_number" records and some of the associated fields to the report.

    Not catching on to JS very well, so any help is appreciated.

    You may sort fields on a date field in the descending order and return only 5 records for report. You can find this setting on the Advanced tab of the results page options screen of wizard.

    Hope that helps

  2. On 3/22/2017 at 10:33 AM, blarney said:

    The style sheet (css) from my webpage removes all styling from my reports and forms. I can't work with iframes, there's just too much of a struggle to refresh data with multiple iframes deployed on one page (for me at least).  

    My question is can I get my embedded deployed code to call the css style sheet from Caspio, instead of that of the webpage???   I've tried copying all the css into the webpage's style sheet, but for some reason my tables on this website appends a number at the end of of the css selector... for example:

    .cbFormLabel

    is now

    .cbFormLabel_23b221101fd7e9

    I have no idea if my website software (Artisteer) is appending that, or if the host is.... I know just about enough about coding, to realize I have no idea what I'm doing, any help would be very much appreciated.

     

     

     

    Hi blarney,

    This is the common problem for CMS users. If you use embed code, the datapage become a part of a webpage, hence inherits all style attributes, defined for the webpage. Is your CMS allows editing CSS code of your theme? If yes, you need to edit CSS of your CMS and delete or edit some attributes.

    If you can't edit CSS of the theme, overwrite elements in the header of the datapage. For example, if your CMS enforces borders, add the following code in the header of datapage:

    <style>
    #caspioform tr
    {
    border: none !important;
    }
    #caspioform td
    {
    border: none !important;
    }
    </style> 

     

    Using iframe deployment eliminates style issues, however you may face problems with passing parameters.

    Hope that helps

  3. 19 hours ago, telepet said:

    I have a search form where I'm using a range comparison type to find items within certain ranges.  My data contains numbers but also blank cells.  While still using range comparison type, is there a way to search for and return results where value is blank or NULL? 

    Yes, it's possible, add one more criteria and select is blank comparison type. You may also make this criteria to be hidden.

    Hope this helps

  4. On 2/26/2017 at 0:58 PM, TMeyer said:

    I have the following code in the footer and it produces a button on the bottom of my results page that works to redirect the user to another url. 

    <script type="text/javascript">
    if(!document.getElementById("norecord"))
    {
    document.write('<button onclick=document.location.href="https://www.myirlog.com/logbook/new-record-entry">No, Really, I want to add a new record</button>');

    }

    </script>

     

    However, when I put that same code inside of an HTML block, it does not work: 

    <script type="text/javascript">

    if('[@field:participant_1_name]' != '[@authfield:Name]' && '[@field:participant_2_name]' != '[@authfield:Name]' && '[@field:participant_3_name]' != '[@authfield:Name]' )
    {
    if('[@field:participant_2_name]' == '' || '[@field:participant_3_name]' == '' )
    {
    document.write('<button onclick=document.location.href="https://www.google.com">take  me away</button>');

    }
    }

    </script>

     

    The buttons appear in both locations, but only the footer button works, when the in-line button (the one coded in the HTML block) is clicked, the whole page just refreshes instead of going to google. 

    Try using my code instead of document.write part

    <script type="text/javascript">
     var uniqueId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
      var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
      return v.toString(16);
     });
     document.write('<button id="'+ uniqueId +'">take  me away</button>');
     var button = document.getElementById(uniqueId.toString());
     if(button){
      button.addEventListener('click', function(event){
       event = event || window.event;
       document.location.href = "https://google.com";
       
       event.stopPropagation();
       event.cancelBubble = true;
       event.returnValue = false;
       return false;
      }, false);
     }
    </script>

     

  5. On 3/12/2017 at 0:49 PM, AnaBella said:

    I have tried Caspio and love it. The only limitation which I think is customization power on detail report page. Rather than just showing value in text format, it would be much better if we can customize every single detail of it like create our own HTML page and using the parameter, display those values accordingly in the detail report page. Perhaps such function is already available but I haven't tested it yet. If it is available, please redirect me to some tutorial to look more information on it. Thanks.

    Hi AnaBella, welcome to forum!

    You may use html block for this purpose. Use html tags to locate your field values as you wish. Parameter picker allows to select field parameters instead of actual fields. You may find more info here

  6. Try adding a condition before concatenation. Use my code instead of this part:

    document.getElementById("InsertRecordemailstosend").value = x1+" "+x2+" "+x3+" "+x4+" "+x5+" "+x6+" "+x7+" "+x8+" "+x9+" "+x10+" "+x11+" "+x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; 

     

    if (document.getElementById("cbParamVirtual1").checked==true)
    {
    document.getElementById("InsertRecordemailstosend").value = x1+" "+x2+" "+x3+" "+x4+" "+x5+" "+x6+" "+x7+" "+x8+" "+x9+" "+x10+" "+x11+" "+x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; 
    }
    else{
    document.getElementById("InsertRecordemailstosend").value = x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; 
    }
  7. On 3/10/2017 at 5:17 PM, telepet said:

    I just watched the video How to Create Multiselect Dropdowns in Caspio.  The video introduces several new data types:

    • List - String
    • List - Number
    • List - Data

    I've created a new table to try these new types out but do not see any of them as data type options.  Should I be seeing these new data types now, or is this scheduled to be included in an upcoming release perhaps? 

     This will be included in the upcoming release. You will see a new datatype when your site is updated. You may use this page to check maintenance date for your data center

  8. On 3/6/2017 at 1:25 PM, Heidi said:

    Hi All,

    I am a newbie - so please forgive me if the answer to this is obvious and I've just missed it.

    I want a user to be able to append multiple records from an excel file into a table through a data page.  And I want there to be some checks while they do it (like making sure that there are no blank or duplicated records).   The user might want to upload anywhere from 1 to 1,000 records, so it would be very difficult to do this by hand.  Once the data is loaded,  I want to be able to generate charts and reports from it as if it were a regular data table. Is there a mechanism in Caspio to do this? 

    Thank you!

    Hi Heidi,

    You can append data to table using manual import or scheduled import task. But it's impossible to insert more than 1 record at once though the datapage.

     You may want to contact Professional Services team, I think they will be able to implement that.

  9. On 3/6/2017 at 1:41 PM, jchouse112 said:

    I have a Submission form and results form on the same page. When I submit the criteria, my results form displays the correct results but the criteria fields all clear back to their defaults. Is there any way I can retain what is entered in the submission form? 

    Make fields onload receive the same parameter that each of them pass. It should help.

  10. On 3/3/2017 at 5:17 PM, JoshuaJobin said:

    I am running into this as well, with nearly 100 datapages. I have a Dev account and a Production account. How would you go about merging the changes from the Dev account to the Production account? When you import a datapage into an empty account, the AppKey, for the most part, stays the same. The only difference is the first 5 characters in the AppKey (Which is luckily account related). So, I am wondering if there is a way to import the App into a Production environment, and it auto-detects which Datapages need updating. Thanks!

    If you export the whole app from dev account, during import in production account you will be able to replace existing app or import as a new app. Replacing is not and option, since you will overwrite everything, including data source tables, therefore I would recommend using custom manual export and select only those datapages which you need to import back in the production account. 

    You may want to sort datapages  on the last modified date in the dev account, this way you will find datapages, which should be exported. If you don't want to do that, just select all the datapages without dependencies.

    Then import the file into the production account. Don't worry about appkeys, because appkeys of the datapages will remain the same, since datapages were created in this account initially. System will identify the datapages on appkeys and you will be able to replace existing datapages. 

    You may test on one datapage first to see how it works.

    Hope that helps. Please feel free to ask if something is not clear enough.

  11. On 3/6/2017 at 5:33 PM, MilosT said:

    Hi,

    I created table with name USERS.

    Inside I have defined 3 items : NAME, PASSWORD, EMAIL

    Is it possible to add record to this table by some script?

    When I do it locally, I'm using script like this :

     

    <?php
    //Variables for the connection
        $servername = "localhost";
        $s_username =  "root";
        $s_password = "abcdef";
        $my_Table = "USERS";
        
    //Variable from the user    
        $NAME = "JOHN";    $PASSWORD = "abc";    $EMAIL = "john@john.com";
       
        //Make Connection
        $conn = new mysqli($servername, $s_username, $s_password, $my_Table);
        //Check Connection
        if (!$conn) die("Failed. ". mysqli_connect_error());
        
        $sql = "INSERT INTO users (NAME, PASSWORD, EMAIL)
                VALUES ('".$NAME."','".$PASSWORD."','".$EMAIL."')";
        $result = mysqli_query($conn ,$sql);
        
        if(!result) echo "error";
        else echo "ok.";
    ?>

     

    Is it possible to upload PHP like this to caspio server? Into which directory?

    What about my_Table name ? What is correct filename, I mean web address for browser.

     

    Thank You in advance for any help.

    Regards,

    Milos.

     

     

     

     

     

    Hi Milos,

    As far as I know, you can't upload this php code to caspio server. Perhaps API intergation will help. Check the "post table row" table operation in this article

  12. On 3/4/2017 at 9:09 AM, DesiLogi said:

    Does anyone know the adjustment for this code to work? I'm trying to copy the value of a Virtual field (drop down)  to a regular text field, on a button's click.

     

    Here's the code I'm working with:

    
    <div style="text-align: center;">
    <input class= "cb_custom_btn" type="submit" onclick="myfunction()" value="Submit" />
     
    <script>
    function myfunction()
    {
    
    var virtualval = document.getElementByID("cbParamVirtual4").value;
    document.getElementByID("InsertRecordMyFieldName").value = virtualval;
    }
    </script>
    </div>

    I'd also tried the ElementsByName with [0] for cascading values but that doesn't work either..

    What's weird is I've used code similar to this for the same purpose with no problem so I must be missing some minute detail. Any help would be greatly appreciated. 

    I would recommend separating html and java script. Also you should use getElementById instead of getElementByID.

    Try using html code in html block:

    <div style="text-align: center;">
    <input type="submit" onclick="myfunction()" value="Submit" />
    </div>

    And the following script in the footer:

    <script>
    function myfunction()
    {
    
    var virtualval = document.getElementsByName("cbParamVirtual4")[0].value;
    
    document.getElementById("InsertRecordMyFieldName").value = virtualval;
    }
    </script>
    


     

  13. On 3/3/2017 at 2:51 PM, Heineperson said:

    Hi! 

    This is my first question on this forum, so I apologize if this question is not in the scope of the board

    I followed this thread to concatenate values from four virtual fields onto an existing field on a details page upon "update". I added the code below to the footer of my details page, and it worked when my virtual fields were text fields. However, this code did no longer worked when I changed my virtual fields to autocomplete fields. Is there another step I need to convert the autocomplete to text?

    
    <SCRIPT LANGUAGE="JavaScript">
    function concatenate()
    {
    var x0 = document.getElementById("EditRecordOtherCollectors").value;
    var x1 = document.getElementById("cbParamVirtual2").value;
    var x2 = document.getElementById("cbParamVirtual3").value;
    var x3 = document.getElementById("cbParamVirtual4").value;
    var x4 = document.getElementById("cbParamVirtual5").value;
    
    document.getElementById("EditRecordOtherCollectors").value = x0+" "+x1+" "+x2+" "+x3+" "+x4;
    }
    
    
    document.getElementById("caspioform").onsubmit=concatenate;
    </SCRIPT>

     

    Thanks!

     

    Hi, welcome to forum :)

    I edited your script a little bit, we need to use another syntax for autocomplete fields.

     

    <SCRIPT LANGUAGE="JavaScript">
    function concatenate()
    {
    var x0 = document.getElementById("EditRecordOtherCollectors").value;
    var x1 = document.getElementsByName("cbParamVirtual2")[0].value;
    var x2 = document.getElementsByName("cbParamVirtual3")[0].value;
    var x3 = document.getElementsByName("cbParamVirtual4")[0].value;
    var x4 = document.getElementsByName("cbParamVirtual5")[0].value;
    
    document.getElementById("EditRecordOtherCollectors").value = x0+" "+x1+" "+x2+" "+x3+" "+x4;
    }
    
    
    document.getElementById("caspioform").onsubmit=concatenate;
    </SCRIPT>
    

     

     

  14. On 3/4/2017 at 1:47 PM, SMEAM3DP said:

    We'll double check the padding attributes. Here is the URL: https://c2axa339.caspio.com/dp.asp?AppKey=a6e840009cbaa8c1f8814701b2a7

    Appreciate any help!

     

    I see that field, which  contains a lot of text in the bottom of the datapage causes this issue.

    Try specifying width attribute for the following class:

    .cbFormLabelCell

     

    Try setting  width:60px: to see if it works for you. I would recommend making a copy of the style and apply changes to the copied style, so it will not affect other datapages.

    Hope that helps.

  15. On 2/23/2017 at 7:20 AM, SMEAM3DP said:

    On our details page, we have set up data to be displayed to the right of the label. When going through the details page by page, the amount of space between the label and data can change significantly from page to page. How do we set the format/style so that the spacing from label to data is the always the same?

    It's hard to say what exactly causes changing space without checking the datapage. You may send me the URL and I will check. 

    The only idea I have at the moment is try changing values for padding attribute for the following classes: .cbFormLabelCell  and .cbFormDataCell

  16. On 2/28/2017 at 0:19 AM, georgep said:

    We have a requirement for our Users to be able to update v quickly a large number of records within a tabular type report.  The Bulk Edit/Update on its own wont work for us as we need to - when updating each of the records - to concatenate two Notes fields together along with a  system date within each record and update another field.  We can do this quite easily with JS in aa single  Details Page (simple JS concatenating the two different notes values and adding today's date). However this approach does not seem to work on the Bulk Edit/Update - as whilst we can change a common field value across multiple records we cant get JS to individually do a concatenation in each of the records involved.

    Am really interested in any ideas for this.  Our latest thinking - please comment - is to use a Tabular report of searched records to display in std tabular form to the User.  But to have an HTML block at the end that has a URL link they can click.  This would open some kind of hidden web window/tab  containing a Details record that we can apply the JS to (as advised above) for concatenating the two Notes field values and the date within each record.  

    We have not quite got this to work and I would be really interested in views from this Forum.   A key stumbling block is to arrange for a Parameter value that can be selected once - whilst at the Tabular report - and then reused/retained as the User works his/her way down the list by clinking on the link quickly opening/closing a Details form (using Auto Submit?).   This parameter value we use to update a field with the records status.  It and the values of the Notes fields that we concatenate and then update another field and really the record changes we are trying to accomplish.

    We have tried using a second datapage with a dropdown of the values that would hold a parameter value to pass over.  However it loses its value after the first click.  We were wondering if we could have somekind of dropbox field that we could set once and which would then keep its parameter value held whilst the User was clicking the html link block on the Tabular report and then activating the hidden web window/tab with the Details record.

    Any ideas from you experts out there :-)

     

    I would recommend concatenating fields in a formula field on the table level.

    You just need to add one more field to the table and on update write date in it. Then, in the formula field concatenate 3 field. This article should be helpful. In this case you may use bulk or grid edit feature.

    Regarding your idea with creating a link in html block. It's possible to implement that, you just need to pass parameters, concatenate value and autosubmit a datapage. I wrote a script to the similar request, you may find it here. However, I think, this is not very user friendly solution, because you would need to hit that link for every record.

  17. On 3/1/2017 at 3:23 PM, freshstart said:

    I have deployed 2 datapages to my webpage, 1 submission and 1 report. The submission datapage has a large number of dropdowns so it takes some time to load.

    Anybody know how I can put a progress bar or spinner up to indicate that date is being retrieved? It doesn't even have to be a progress bar - just a spinner indicating that something is happening so visitors won't leave the page to soon. I would need it to disappear once the datapage has loaded.

    I saw this article from a while back but it never indicates how to close the bar or spinner once loading is complete. Js: Auto-Submit A Datapage - Caspio JavaScript Solutions - Caspio Community Forums

     

    Thanks for any help!

    I believe this post should be helpful. You may try using one of plugins recommended there.

  18. 1 minute ago, Mylene said:

    Hi, 

    I would like to know if it's possible to open an URL after form submission in a new tab. I tried different settings. but none of them redirect me  to a new tab.

    Thanks

    Hi Mylene,

    There are a few options:

    1. You can select the "Display a message" option after form submission and paste the following script in the place for message:

    <script>
    
      window.open("Your_URL");
      
    </script>

    Insert your URL instead of Your_URL

     2. Another option is redirect to another URL when you hit the Submit button on the form. In this case, you need to insert the following code in the footer of the datapage:

    <script>
    document.getElementById("caspioform").onsubmit=function()
    
    {
    
        window.open("Your_URL");
    
      }
    </script>

     

  19. On 2/21/2017 at 2:35 PM, TWIRED said:

    These type of urls , used to work flawlessly

    https://c2eku181.caspio.com/dpImages.asp?AppKey=ff384000f093d12f0cad40eab055&file=/IMAGES_/TRIPATWORK/TESTIMAGES/spiderman.jpg

     

    Last night it stopped working.

    it gives "File or Directory Not Found" error

     

    We use this type of display of images a lot with our apps.

    any idea why???

     

    Update 

    It seems to be something to do with the fileID changing.

    If a field is set to : Upload New File / (Automatically create a unique name) 

    1) a user uploads a file abc.jpg the first time.
    2) when the user uploads a file :- again with the same name,
    The URL link to the original abc.jpg does not work - because the fileid changes.

    Im assuming this happens because at caspios backend , the fileid is referred to when the url is parsed.

     

     

    Hi,

    I see two possible reasons of this issue.

    - the file was deleted;

    - this is an Orphan file. It means that this file is not referenced to any table, therefore it can't be accessed from outside. However you should be able to find that file in the All assets->files

    Hope that helps

  20. 17 hours ago, alwinoei said:

    Please help me out, i'm not a code programmer.

    I want to combine in Wordpress the following:
    The output will be in WP.
    - Caspio result datapage with property information
    - Photo gallery, managed with a WP gallery manager

    To make it a bit easier i have an explanation on the website:

    www.oeihousing.com/property-page

    (password: caspiotest)

    Thanks!
    Alwin

    Hi Alwin,

    The same solution which I recommended for another datapage should help in this case as well.

    You need to overwrite user agent stylesheet. Do you have access to css of the theme?

    If yes, insert the following code to your theme:

     iframe{
      border:none !important;
      }
    If you can't edit theme, put the code between style tag and insert in the head section of your webpage.

     

    Hope that helps

×
×
  • Create New...