Jump to content

Search the Community

Showing results for tags 'filter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 9 results

  1. I am trying to conditionally show/hide HTML elements based what type of user is logged in. I’m not too familiar with how Caspio sessions are handled and how they relate to my HTML pages. I also have very little Javascript experience. There should be three levels of access, Admin, Manager, and User. I currently have an authentication table that has three users and three yes/no fields (admin/manager/user), each user is a different type. My first idea was to use cookie data. On successfully logging into my authentication form it would make a cookie for user type which would have a value of admin, manager, or user. Then I could use that cookie to add the display:none style to certain elements that I don’t want lower access users viewing. My problem is that I’m not sure how to do that with Javascript, or if that is the best practice. I currently have an HTML Datapage linked to my Authentication. On that page is this code: var type_admin = '[@authfield:admin]'; var type_manager = '[@authfield:manager'; var type_user = '[@authfield:user]'; if (type_admin == "Yes") { document.cookie="type=admin"; } else if (type_manager == “Yesâ€) { document.cookie="type=manager"; } else if (type_user == “Yesâ€) { document.cookie="type=user"; } Then I assume I would just reference the cookie on my HTML pages somewhat like this: <div class="adminContent"> Show this content if the user is Admin </div> <div class=â€managerContentâ€> Show this content if the user id Manager </div> <div class=â€userContentâ€> Otherwise show this content </div> Here are the HTML/PHP files I’m working with: http://domco.us/vita/test/ And here is the login page that’s just an embedded Datapage: http://domco.us/vita/page_login.php In the end I would like to be able to filter things like navigation buttons or div blocks. It would be great to have an Admin Tools link in the navigation that only Admins/Managers could see. I’m not sure the specifics of getting something like this to work. Also I don’t know how to keep that @authfield data throughout different HTML pages (not linked to Caspio) and I’m just assuming Cookies are the best option. Any help would be greatly appreciated.
  2. Hello everyone! I try to filter records by "previous month", but I cannot find the filter. There are the "Current Month", "Before Now", "Previous X Days" filters. I tried them all one by one and I tried combining of these filters, but the problem is "Previous X Days" is variable. I mean, today the previous month is: IS Previous 34 days AND NOT Current Month But tomorrow it should be 35 days... Any ideas are very much appreciated! Thank you for your time!
  3. I want to be able to search a table according to the criteria of a “From Time” (greater than equal to) and a “To Time” (less than equal to), the problem is that there is no option for Time, only Date AND Time. The result should be ALL records from all dates between the specified time. Eg. Created on (Timestamp) From 06h00 To 08h00 à display records created between 06h00 and 08hoo across all of table history. Currently I am using a submission form with a virtual field to pass the parameter to the search form. I have one Timestamp field and three Date/Time fields I wish to search. Is there any way to setup a criteria with only a time precision?
  4. Say I have 3 tables; Users, accounts, assets. A user is completely unique and has a one to many relationship with Accounts. Accounts has a one to many relationship with Assets. I want to create a form for adding new assets. The person needs to select which account the asset belongs to. Given multiple users, each with numerous accounts - simply having a full drop down list of all the possible accounts is not feasible. How do I create a form with a "user" dropdown where the "accounts" dropdown only shows values linked to the selected "user"? Thus filtering the possible accounts to just the ones belonging to a specific user? I have played with rules but cant seem to find a way.
  5. Does anyone know if its possible in JS to dynamically change the filters applying to a Table or View that's linked to a datapage? I have several checkboxes for Users to select from, and the selections can drastically alter the types of filters I want to apply. Essentially I'm looking for much greater control over the results table than the Caspio wizard screen filters can allow. Thanks
  6. Is there a way to use the 'Allow users to select data using a search form' option on a tabular report but to SKIP opening the search form on 1st load of the report? Meaning, I'd like the user to go straight to the report's results and THEN if they want to search/filter they can click the 'Search' link and go to the search form. I know how to use a separate submission form to do a search/filter but that causes a LOT of extra datapages in the app and I have to pay for those over my limit (my app is huge). Also it's far more intuitive to open the full results set and then do a filter. It's clunky to have to go through a search form first to get to the results. This should be a standard option, IMO, like a check box in the wizard for 'don't open search form upon report opening. That said, I need a workaround. I got some basic concept for it from someone: "You will need to pass parameters to the URL of the resultspage for eg: showform =0 or 1 In the configure search fields you will write a javascript to hide the form is the showform is 0, When they link to see the search form again then you will pass the parameter to say 1 then the search form JS will show the fields in the search form. " I have no idea how to implement this in the report itself. If anyone has any ideas that'd be really great- thanks!
  7. I'm creating an appointment request form but I've run into a problem I can't seem to figure out. I'm trying to figure out how to filter a dropdown/picklist based on multiple criteria. Criteria # 1 Office location. - Client selects an office location first, so I used it as the parent field of my cascading dropdown Criteria # 2 Is the date of the requested appointment (Date_Requested) the current date or date in the future Criteria # 3 If the date of the requested appointment is the current date, filter by appointment slots greater than 2 hours. The dropdown list is another table in my system which contains the following fields. Office_Location Timeslot (ie. 8 am-9 am) Appt_Hour (this is the hour of the time slot, ie. 8 am - 9 am shows as 08) Current (this is a y/n field) Basically what I need to happen, is that when a user selects the facility and the requested date of appointment, *if the requested date is after today, they will be shown all appointment slots for that facility that are marked "N" in the Current field *if the requested date if for the current date, it will show only appointment slots that are marked "Y" in the current field and who are greater than 2 hours in the future. ie. if they request an appointment at 10:30 for the same day, the available appointment slots are 1pm-2pm, 2pm-3pm, etc. Any assistance would be greatly appreciated. Thank you
  8. Hi, I'd like to share a performance tweak I discovered this morning. Filter your data at the Data Page, not the View. In a View, I filtered out values based on the criteria of time-stamped values from the last 30-days. The Data Page that used this view took ~9 seconds to load. I switched to Filtering a DataPage, and now it loads in <1 second. Think Easy CHAD
  9. Hello; I am trying to create a view in which I would like to use multiple criteria on one field to filter the data. i.e. RecordID <> 101, 109, 117, 131, 140 When I attempt to do this Caspio tells me "Invalid value - Value Must Be A Number" Is there a workaround for this? Thanks!
  • Create New...