Grab Advanced Search Vars in Event

I though this is something that is straight forward but I cant seem to get past this one.

I am running a report with data based on advanced search using date, and I cant seem to find a way to get search variable used in advanced search, in events

For example - you open grid and open advanced search, select date range and run the search - I need to grab that date range in events and inset it in to custom code to properly calculate each row in the report.
I tried using $_GET and $_POST but those are not giving anything. Thanks in advance.

Thanks for everyones help… I figured this one out.

If you want to have access to form data used in the Advanced Search on field level you will need to do some tricks. Main problem is that search variable content is available under same field names(variables) as row data. This means that if you have {add_date} field and search by same field then both - search add date and value for each row in OnRecord even will be in same variable {add_date}
This means that search result is there before individual records begin loading but once they do - search value is lost and gets overwritten by data from the database.

With that in mind, search var data is available under same names listed in Advanced Search - Fields ex ( {name}, {phone_number}). But you will need to store it in separate variable if you need to use it after records begin loading.

Hope this saves other people time.

Thank you Proper!
You saved time for many others like me… :slight_smile:

Hi,

May i know how you do it? now i need to fetch the search date data (between) into my onrecord event sql query.