Buy Now
Sign in

Event Switcher not working as it should be

black_angel , December 22 2017
Answered
B
black_angel
im trying to use event switcher to filter empty value in array and save data to database.
but the problem is after the first return of 'success' every event in event switcher will be fired no matter what is returned.
here is custom php code:

$res=$this->get("loop_event29.row");
$event='fail';
if(strlen($res)>0){
//echo "row :".$this->get("loop_event29.key");
$event= 'success';
}
return $event;


as you can see in my attachment (response),after first success event both events will be fired regardless of what is returned value.
Attachments
event_switcher.JPG
event_switcher.JPG
(40.71 KiB)
47 Downloads/Views
success.JPG
success.JPG
(47.05 KiB)
66 Downloads/Views
fail.JPG
fail.JPG
(40.33 KiB)
55 Downloads/Views
response.JPG
response.JPG
(38.68 KiB)
61 Downloads/Views
array.JPG
array.JPG
(16.06 KiB)
63 Downloads/Views
admin
Hi,

Please post a screenshot of your events setup!

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
B
black_angel
Hi,tnx for ther replay but i solved my problem by using php codes instead of event switcher.
i already attached success and fail event screenshots in my attachment.