Jump to content
  • 0

Limit searching



4 answers to this question

Recommended Posts

  • 0

I have an Idea for this one but Its a bit tricky to set-up

first, you will have to create a set-up where you are going to use a seperate search form results form. Please refer to this article:


You will also need an extra table with similar design to your main table. Use that as the data source of your submision(search form).

You will also need an authentication for this workflow. Even if your users are non paying, they should still have an account first before being able to access the forms.

You will need to have an extra field on your users table which will mark which is paying and which is not. (preferably a text 255 which says "paid" or "free")

Also, on your submission form, create an extra virtual field, set it to a calculation value that will check if the current users are paid users or not. If it determined that the users are non paying, it will count how many searches are conducted within the month. It can be done by using a conditional statement that returns the URL of the report page if the conditions are met properly. Otherwise, redirect the users to a different page which has a message that they have exceeded their limit search for the month.


Link to comment
Share on other sites

  • 0

As for the formula, you may refer to this one:

when [@authfield:Role] = "paid"
then"URL for report page"
When (Select count (Id) from "extra_table_for_subform" where DateDiff(month, date, SysDateTime())) = 0) < 10
then "URL for report page"
else "URL for notification message about limit"


LAstly, on your destination after submit, select the "Go to a new page" then use the virtual field as value along with the parameter

I hope the idea helps.

Link to comment
Share on other sites

  • 0

I understand the theory and have started to apply it. However, the formula doesn't seem to work. I have as follows:

WHEN [@Virtual9]='Paid' THEN "https://c1ace471.caspio.com/dp/00118000bee75c1ed6e84ba6b6c4"
WHEN [@Virtual9]='Free' THEN (SELECT COUNT (Virtual10) WHERE DateDiff(month, date, SysDateTime())) = 0) < 10
THEN "https://c1ace471.caspio.com/dp/00118000bee75c1ed6e84ba6b6c4"
ELSE "https://c1ace471.caspio.com/dp/0011800083f54cec70c44a2488f7"

The relevant fields are present, the pages are created, and I reference the virtual field in the destination. But nothing happens when I select submit (no error or anything, just stays on the submission form). I suspect it is the URLs. How should I be writing them to make the redirects work?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...