You're wanting to limit the number of connection requests. All of my suggestions in this topic have followed your initial proposal of limiting the number of connections, which is exactly what it's doing and is why you're observing the behavior of deleting a connection and adding a new one.
To limit the number of requests is a completely different implementation and requires additional actions. For example you need to know how many requests they've made and to do that you need to update a field that holds the number of requests they've made every time they make one. So you'd create an integer field and on the same trigger as your redirect if they haven't hit their limit you'd want to increment that integer field by 1 so the request count goes up. In this usage you won't be using a query field at all, but basically just 2 integer fields. 1 for the limit and 1 for the number of requests.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
you are right, my plan has been to base the subscription on 3 elements 1) Time bound 2) Connection limit 3) Price variance as per plan. for the connection limit part is it possible to have a field that gets updated and incremented everytime a new connection is made (this field does not decrement on connection removal)and then that field is used as a condition in Auto actions?
Yes, first you need to create an Integer field to hold your connection requests (it should be set to Read Only). Next copy your Redirect action that does the compare and redirect when their limit is hit. Now change the copy to a Field action and configure it to Add 1 to your new integer field. Next edit your Redirect action and change the CB Query Field substitution to instead point to your new integer field.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Both fields need to be set to display on profile and be read only. Place them in a tab that's in a not shown on profile position to actually hide them. Next use only raw substitutions (e.g. [FIELD_NAME]) as you don't need or want HTML in this case. Your configuration should be as follows.
Field 1
Title: Connection Count
Name: cb_connection_count
Type: Integer
Read Only: Yes
Show on Profile: Yes, 1 Line with Title
Show on Registration: No
Show on Profile Edit: No
Field 2
Title: Connection Limit
Name: cb_connection_limit
Type: Integer
Read Only: Yes
Show on Profile: Yes, 1 Line with Title
Show on Registration: No
Show on Profile Edit: No
Auto Action 1
Title: Increment Connection Count
Triggers: onAfterAddConnection
Access: Everybody
User: User
Type: Field
Conditional: [cb_connection_count] Less Than [cb_connection_limit]
Field: Connection Count
Operator: Add
Value: 1
Auto Action 2
Title: Connection Limit Reached
Triggers: onBeforeAddConnection
Access: Everybody
User: User
Type: Redirect
Conditional: [cb_connection_count] Greater Than or Equal To [cb_connection_limit]
URL: index.php
With the above all that's left is CBSubs Fields and your plans to adjust the Connection Limit. If the above still is not working for you then please PM backend super administrator login credentials and will take a look.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.