Hi,
I have setup a form that does a read of the database on load. I need it to check a field on load to see if it contains data, if it does it should redirect to another page. How should I go about doing this?
Cheers.
I have setup a form that does a read of the database on load. I need it to check a field on load to see if it contains data, if it does it should redirect to another page. How should I go about doing this?
Cheers.
there is an "if conditions" action, and in v7 there is a "Run Conditions" behavior to assign to a redirect action, but there is a bug in the redirect action at the latest v7 update!
Don't even need if conditions in v6. Just do a read data, and in the "found" branch put the redirect.
Thanks healyhatman, thanks for that. I think I am close but its not working, can you see what I have below and let me know where I am going wrong. I want it to return the data for the {user_uuid} which it does, but when I add the extra condition for {radio35} it errors. I need it so if it finds the {user_uuid} + {radio35}=y then redirect, otherwise continue.
Well do you have a radio35 column in your database? Or are you looking to check the value of a field called radio35?
Hi, yes I have a column in my DB called radio35. If it has Y in it then it means the user has already filled in the form, so I want it to redirect to another page. If any other value in that field including NULL, it should continue to load the form.
Well you say there was an error but what error
So, I have tried the below option. It works if there is a Y in the column it redirects, but if there is not it does go to the form but it does not prepopulate the data:
Well of course not. You're asking it to get ONLY the data where the uuid matches AND radio35 is Y.
One. In found, do an event switcher where if {var:readfataname.model.radio35} is Y you do the redirect
This topic is locked and no more replies can be posted.