I am new to looker and trying to build a basic report that allows participants to search with their phone number. I have a google sheet with the following columns:- User_id, phone, Name_to_be_Printed, Full_Name, Address, State, City, pin_code, t_shirt_size, Status, Email. I put a search box for phone number and set the default value to '0' which works fine. The search also works fine, however, when I delete the zero the table starts showing all the data from the google sheet. I tried to put filters, I tried to put a calculated field but none of those work. I also tried using different control styles like dropdown list, input box, advanced filter etc. but none of those work. I dont want to filter by email since email can be wrong and I need to allow people to search by phone number. Can someone help please
Solved! Go to Solution.
I'm not quite following the problem.
You've set a default value for the phone number, good. When someone deletes that default value, they get all of the data. That makes sense. Then if they start entering the phone number, they get the data for that phone number. Correct?
Which part of this isn't working as expected?
How about making a parameter for the user to enter the phone number, then a calculated field (called Include) that returns a 1 if the parameter entry matches a record, a 0 if it doesn’t.
Then, put a filter on the report that only allows records where Include=1.
I'm not quite following the problem.
You've set a default value for the phone number, good. When someone deletes that default value, they get all of the data. That makes sense. Then if they start entering the phone number, they get the data for that phone number. Correct?
Which part of this isn't working as expected?
Hi,
The part where they backspace and can see all the data. That is a privacy concern. I need them to be only able to search their own mobile number and see their own data. At no point should they be able to see all the data. So when they backspace the value is NULL and NULL should retrieve zero records - not all records.
How about making a parameter for the user to enter the phone number, then a calculated field (called Include) that returns a 1 if the parameter entry matches a record, a 0 if it doesn’t.
Then, put a filter on the report that only allows records where Include=1.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |