Hello! Hoping for some help here, I'm having trouble wrapping my head around the query I'm trying to create for some reason. I have a page, and there are a set of demographics fields on this page. For each demographic field, there is a corresponding "opt-in" field. If the opt-in field is marked TRUE, the field should show on the page. If the corresponding opt-in field is marked FALSE, the field should not show. This is kind of what I have right now, which I know isn't right at all because it's not working correctly. I think I've confused myself with all the fields I've had to create for it. The example would be if I'm viewing the page with Sally's information and Sally has the EthnicitSelfDescribeOptIn__c = TRUE and GenderSelfDescribeOptIn__c = TRUE then I should be able to view the values she has entered for EthnicitySelfDescribe__c and GenderSelfDescribe__c. Since I all other opt-ins are set to FALSE, I should not see any other fields/information.
GenderSelfDescribe__c
SELECT FirstName,
NU__MiddleName__c,
LastName,
PersonEmail,
PersonMailingStateCode,
LeadershipPositions__c,
NU__Biography__pc,
NU__CasualName__c,
NU__Ethnicity__c,
NU__LinkedInAccount__c,
NU__FacebookAccount__c,
NU__Suffix__c,
PersonBirthdate,
PersonHomePhone,
PersonMobilePhone,
PersonTitle,
Salutation,
Website,
AreYouAFreeLancer__pc,
EthnicitySelfDescribe__c,
GenderSelfDescribe__c,
Transgender__pc,
WhatIsYourSexualOrientation__pc,
SexualOrientationSelfIdentification__pc,
IdentifyAsAPersonWithDisabilities__pc,
USArmedForcesMilitaryService__pc,
IMDBURL__pc,
OtherOrganizationsandMemberships__pc,
MediaOfExpertise__pc,
Representation__pc,
RepresentationPhoneNumber__pc,
BirthDecade__c
FROM ACCOUNT
WHEREId = {!id} AND BiographyOptIn__c = TRUE AND
CasualNameOptIn__c = TRUE AND
DecadeBorn_OptIn__c = TRUE AND
Disabilities_OptIn__c = TRUE AND
EmailOptIn__c = TRUE AND
EthnicitySelfDescribeOptIn__c = TRUE AND
Ethnicity_OptIn__c = TRUE AND
FacebookOptIn__c = TRUE AND
FreelancerOptIn__c = TRUE AND
GenderSelfDescribeOptIn__c = TRUE AND
Gender_OptIn__c = TRUE AND
HomePhoneOptIn__c = TRUE AND
IMDBURLOptIn__c = TRUE AND
LeadershipPositionsOptIn__c = TRUE AND
LinkedInOptIn__c = TRUE AND
MediaofExpertiseOptIn__c = TRUE AND
MiddleNameOptIn__c = TRUE AND
Military_OptIn__c = TRUE AND
MobilePhoneOptIn__c = TRUE AND
OtherOrganizationsMembershipsOptIn__c = TRUE AND
ProfessionalTitleOptIn__c = TRUE AND
RepresentationOptIn__c = TRUE AND
RepresentationPhoneOptIn__c = TRUE AND
SalutationOptIn__c = TRUE AND
SexualOrientationOptIn__c = TRUE AND
SuffixOptIn__c = TRUE
Any help is appreciated - thank you!
Hi Amy,