Google Data Studio: Filter report data through parameter in URL - google-data-studio

I have a Google sheet where each row contains data for a single person.
First column is an alphanumeric random id.
Is there any way I can build a personal score card report which I can share with each person through a link?
The link would contain a parameter for filtering the datasource by the id column. I mean sharing by sending links via email, for example:
Send an email to John with the following link: <url>?id=kfdjfhdfljdshfsdkj
Send an email to Mark with the following link: <url>?id=fdyfdhfsfjsdkjfksd ….
I have thought about adding a filter control plus enabling bookmark urls, but would like to avoid that as that would be a possible security breach. Other ideas?
Thanks

If you can put your data in BigQuery, an alternative approach is to use authorised views. It is explained in details in How To Control Access To BigQuery At Row Level With Groups

The filter based on the email address feature can be implemented by adding an email address field alongside the existing field(s), such as alphanumeric random id in the Google Sheet.
Once that's done, connect the Google Sheets Data Source to Google Data Studio, and then at the Data Source, filter based on the email address of the respective user ID (filter located on the upper left of the Data Source section).

Related

SalesForce: How can I link a custom object field to a value Account record

I am trying to find a solution of how to lookup a value on the Account Object and place it in a field on a record of a Custom Object.
Details below:
Objects
Accounts/ Organizations - This contains information on different projects supported by my origination. Key fields of note: Project Name(text) and Account Balance(text). There around 100 unique records in this object These field are manual led created.
Regrant Request - This object contains records that are generated via web form that the projects fill out to receive payment for expenses related to their project. Each Regrant Request record also contains the Project Name(text) Account Balance .
Desired Result:
When a new Regrant Request record is generated from the web form, it will take the value of the Project Name, match it with a record in the Accounts/Organization object. Once the link has been made, I would like to take the value of the Account Balance in the Accounts/ Organizations Object and copy to the Regrant Request record.
The problem that I am trying to solve is that in order a project to be paid the amount of money they request in the regrant request, they have to have enough funds. It would be great if I did not have to leave the regrant request record to find this value.
I know that I have to tie each regrant request record to an account id. That is stright forward but I am stuck on how to then get a value of field for said account id and then copy to a custom object.
any ideas would be extremely helpful!
I found out how to use zapier to do a search of the account object using the value of field inputted via the online form. So cool !

Search / Filter problems

I have a database that stores a range of email addresses, i also have a table consisting of all of the approved addresses. the search i am looking to complete is one where when i run the approved member query and its returns all of the members that have an email address already approved by the database. i have set up a provider column this i though would be best to link these through for example:
if i have hotmail.com and aol.com authorised
when i run the query it will return all emails ending with these providers. a basic filter could work but i have hundreds of approved emails. so im asking is there anyway to search through the entire column of the approved list?
How about:
SELECT Email FROM Table
WHERE Email IN (Select Email FROM ApprovedTable)

Database design for opt-in emails

I have a table of users in SQL Server with all the contact details, personal details etc. When each user signs up to my website they will be given the option to opt-in to 5 different types of emails like:
I wish to receive emails about new things
I wish to receive the monthly newsletter
etc etc. I am trying to decide the best way to store this information in a database. My current thinking is to have a seperate table with 5 columns (one for each opt-in) and the value being a bool/bit value.
Since the information wont be required regularly, it will only be required when we want to send mail to user. Are there any better ways / best practices for doing something like this?
The problem with your proposed design is that it becomes difficult to add new email types in the future; you only have 5 now, but what happens when you add a sixth or seventh?.
Instead, I would propose something like:
User Table:
UserID (Primary Key)
User Attributes
EmailTemplate Table
EmailTemplateID (Primary key)
Email Template Attributes
UserEmailTemplates
UserID
EmailTemplateID
You can easily add new templates, and associate them with users.

Create multiselect lookup in salesforce using apex

I want to create a multi-select Contact Lookup.
What i want :
When user clicks on a lookup then he should be able to select multiple contacts from that.
What i have done:
I have created an object and a field inside that object using both
"Lookup" and
"MasterDetail Relationship" and
"Junction Object"
When i try to use this Field for any input text/Field then it always provides an option to select only one value from lookup but i want to have an option to select multiple.
Even in the Junction object i have created 2 master-detail relationships still lookup allows only one value to be selected.Moreover it makes the field mandatory which i don't want.
Links that i followed:
http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC
https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&section=help&hash=topic-title&target=relationships_manytomany.htm
Can anybody suggest me how to do this.
Its same as we use Email CC/BCC under Send Email option for any Lead.
Even you use a junction object a lookup is just that, it references (looks up to) one other record: when you create a record on the junction object you still have to set each lookup individually and you're still creating only one record.
Master Detail relationships are essentially lookups on steroids, one object becomes the child of the other and will be deleted if the parent object is deleted, they're not going to provide an interface to lookup to many records at once.
If you're not a developer then your best bet is to either just create on junction object record at a time, or look into using dataloader. You could prepare your data in Excel or similar and then upload all the records into Salesforce in one go.
If you are a developer, or have developers at your disposal, then what we've done in the past is create a Visualforce page to do the job. So if, for example, you wanted to link a bunch of contacts up to an Account, we'd have a single account lookup field on the page, then some search fields relating to fields on the contact. Using a SOQL query you can then find all contacts matching the search parameters and display them in a list, where you may want to provide checkboxes to allow the user to select the contacts they want. Then it's just a case of looping through the selected contacts, setting their Account field to be the chosen account.
There are areas in Salesforce (such as the send Email functionality you mentioned) where it's clear to see that bespoke work has been done to fulfil a specific task — another instance of what you want is in the area where you can manage campaign members. This is the model I've copied in the past when implementing a Visualforce page as described.
Good luck!
For adding multiple junction objects at one time, the only solution we have found is a custom Visualforce page, as described by LaceySnr.
For a slightly different problem, where we need to assign many of object B to object A, We have trained our users to do this with a view on object B. We are assigning Billing Accounts (B) to Payment Offices (A). The view on Billing Account has check boxes on the left side. The user checks the Billing Accounts to be assigned, then double-clicks on the Payment Office field on any of the checked rows. A pop-up asks if you want to update only the single row or all checked rows. By selecting 'all checked rows', the update is done to all of them.
The view is created by the user, who enters the selection criteria (name, address, state, etc.). All user-created views are visible only to them.

Block list table (IP, Mac, email, name, username)

I am creating block lists to block user actions based on IP address, MAC address, Email address, Name (first/last name), Trademark names and Usernames. So should each of these be a separate lookup table or can there be one blocked_list table with all these in? Each is individual independent of the other.
The list will be used in few places ->
User signup - block account signup based on IP, MAC, email & any disallowed First/last name
Username creation - block username creation based on restricted usernames
Profile details - block profile email being added based on disallowed emails
Public pages - block people from naming pages based on a restricted list of trademarked names.
Also, is it better to keep this in the DB or a text file? Except trademark names everything else will be in English. For trademarks I may use region specific blocking so need multi-lang support.
I'd make each their own table.
how would combining them make your queries run any faster? it wouldn't.
It isn't like you won't know what you have, if you have a MAC address check in the block MAC address table for it, it would be your primary key which would be defined to the exact proper length and type for a MAC address.
What about having 1 table with all the values in and have a column - block_type. You will need a lookup table for block_type where 1=IP. 2 =MAC,... This was you can manage this with only 2 tables. But I'll let someone more professional answer this as I am new myself to databases.
You can put all the entries in a single table. Check out the Entity-Attribute-Value approach or use a schemaless NoSQL datastore.
http://en.wikipedia.org/wiki/Entity-attribute-value_model
If you're processing the 'blocking' in the middle tier, you can just dump the lists as serialized objects (e.g. JSON) into the table.

Resources