Forum Academy Marketplace Showcase Pricing Features

Only When and Terminate This Workflow aren't working as expected

Hi Bubblers,

I’ve setup a number of actions in a workflow to prevent a duplicate record from being entered based on three fields. However, for some reason it does not seem to work.

Here’s how it goes:

Note: Please disregard Step 1 and 2 (They both work perfectly fine)

Step 3 (Doesn’t work) - Show Message/Alert - Show “Must not post duplicate user services” if an existing record of User Service is found based on three fields (User ID, Service Category, Service Type)

Step 4 (Doesn’t work) - Terminate this workflow - Terminate this workflow if an existing record of User Service is found based on three fields (User ID, Service Category, Service Type)

Step 5 (This works) - Create a new record - Create a new User Service if an existing record of User Service IS NOT found based on three fields (User ID, Service Category, Service Type)

Step 6 (Does not work - the workflow never reaches this step) - Go to the next page - send current page parameters + Send more parameters

Here’s the output:

UI - Does not let users progress past this page and keeps showing the duplicate alert even though there isn’t any records in the database

Database’s state Before (Starting Point)

Database’s state After - Record is created but the workflow terminates and does not let users progress past this page

What am I doing wrong here?

Hi there, @arsedian.ivan… I could be way off base here, but having :first item in those expressions doesn’t seem right to me. Instead of :first item is not empty, have you tried :count > 0? I’m not sure if that’s the issue, but it can’t hurt to give it a shot.

Best…
Mike

Edit: oh, wait… I guess you do need :first item if you are using is not empty. I just always go with :count.

Hi @mikeloc yes I have tried both (using count and first item) none of them work strangely. I will post some screenshots of the count shortly

Got any privacy rules in place that might be getting in the way?

No, I’ve intentionally set them all as publicly visible during the development.