close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Add second condition to Insert Record Behaviour

Thread began 1/18/2023 3:31 am by s.joiner74419001 | Last modified 1/20/2023 8:58 am by s.joiner74419001 | 154 views | 6 replies


Add second condition to Insert Record Behaviour

I have an ‘Insert record behaviour’ that is triggered by a ‘form submit’. I would like to add a second condition so it only triggers if both conditions are met. I have constructed an ‘Access Rule’ that I would like to use as the second condition.

The ‘Access Rule’ uses a ‘Record Set’ on the page which basically constructs the following:

Allow If <?php echo($rsConsLeaseholders->getColumnVal("total_flats")); ?> <= 10
( see attached screen shot for settings )

So I want the insert to fail if ’total_flats’ is 10 or less.

I have tried to adjust the insert behaviour ‘if statement’ as follows:

From this - if (isset($_POST["submit-consent-sb"]) || isset($_POST["submit-consent-sb_x"])) {

To this - if (isset($_POST["submit-consent-sb"]) || isset($_POST["submit-consent-sb_x"]) && (WA_Auth_RulePasses("10orLess"))) {

But with the adjustment the ‘Insert Behaviour’ is still being triggered when the ’total_flats’ value is more than 10.

Where am I going wrong here?
Page attached..

Thanks in advance!

Attached Files

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...