Send an Email based on the conditions in drupal7 - drupal-7

I have a question reagarding Webforms in drupal7
Scenario:
I have a table in which i have different jobs with repect to locations for example if i select hyderabad locations in the dropdown than all the jobs related to hyderabad is displayed in the table,same for pune and other cities,so i have a rquirement in which if i apply on the job with location Hyderabad than email should be send to the hyderabad recruitment team and if i apply on the job with location Pune than email should send to the pune recruitment team ,below are the image for better understanding so how can i achieve this?actually i created a form and link this form to the table so when i click apply now button and fill the details of the form and click send button ,currently email sending both hyderabad and pune recruitment team so i want if a user select hyderabad than email should send hyderabad recruitment team same for pune,need any suggestion to achieve this because i am new in drupal7
enter image description here

first of all you need to create your form using drupal 7 form api if you didn't.
in modulename_yourform_submit function get value of selected city from $form_state, then using if statement check the value of city and send different email with drupal mail function

Related

Salesforce Service Cloud - Table Account NULL values

I'm trying to obtain data from Service Cloud Salesforce but when I select the table in SSMS, the data is all NULL, so probably I'm not specifying the right columns or table.
Salesforce Report Builder
Salesforce Source Editor (Visual Studio)
When I run the report in Salesforce I can see that the country and postal code data are filled in, but when I read the documentation, I don't find the main column "Country" neither "Mailing Zip/Postal Code".
For the Zip Code, in this example, since it's also filled in the data about Billing Postal Code, this one I could obtain in the extraction, but for the country I can't find a column named "country", only "BillingCountry" and "ShippingCountry", but these columns do not contain any information.
Documentation:
https://developer.salesforce.com/docs/atlas.en-us.234.0.object_reference.meta/object_reference/sforce_api_objects_account.htm
Can anyone help here? I need to add on the select in salesforce source editor (visual studio) the right column names to obtain the country and the zip code.
Thank you,
Your report mixes fields from Account and Contact joined together by Contact.AccountId = Account.Id. You could edit it and expand the left sidebar to see which field comes from which object.
Account has Billing and Shipping address (2 sets of fields with actual names becoming BillingCity, BillingStreet... And Contact has Mailing address and Other Address.
So that's 4 * 6 fields across 2 tables out of the box. Can be muddied up further if you have "Person Accounts" enabled (some contacts get paired up as 1:1 relation to account instead of 1:n, in something that behaves a bit like materialised view for MS SQL people?). Also admin could rename one of the fields (API Names of columns stay the same but you'd see different labels in report and UI), add custom address fields...
See how these queries work for you. Try them out in Salesforce Developer Console (in web UI), or VSCode first, not in that tool you have.
Pure contacts
SELECT Id, FirstName, LastName, MailingStreet, MailingCity, MailingPostalCode
FROM Contact
WHERE MailingPostalCode = '4465-613'
LIMIT 10
Pure accounts
SELECT Id, Name, BillingStreet, BillingCity, BillingPostalCode
FROM Contact
WHERE BillingPostalCode = '4465-613'
LIMIT 10
Now JOIN (for normal Salesforce, B2B, where Account is more like a company and Contact is more like employee)
SELECT Id, FirstName, LastName, MailingStreet, MailingCity, MailingPostalCode, Account.Name, Account.City
FROM Contact
WHERE MailingPostalCode = '4465-613' AND Account.BillingPostalCode = '4465-613'
LIMIT 10
And since your second screenshot looks like you do have person accounts (more like B2C model, with standalone "1 man companies" like freelancers, doctors working in multiple hospitals, students in education...) try this one too
SELECT Id, Name, BillingCity, BillingPostalCode, ShippingCity, ShippingPostalCode, PersonMailingCity, PersonMailingPostalCode, PersonOtherCity, PersonOtherPostalCode
FROM Account
WHERE IsPersonAccount = true
LIMIT 10

Sending multiple productID with URL (client-side)

React-SPA (client-side-routing)
I have this scenerio .I have a table with many products. And a table have an ID column. When user select multiple ID for example : 023653,023654,023655,023656 (basically they can select as many as they want )
The product URL is : localhost:3000/products
When the user selects multiple products and they trigger the button for example: calculate products .
The user will endup in this URL : localhost:3000/products/023653&023654&023655&...
As you can image if user selects more than 10 items the url would be awfully long.
The reason I want to do it this way is I want the userA to be able to send their selected page to the userB for example (localhost:3000/products/023653&023654&023655&). And once the user B open this page they will see everything the userA can see. What is the ideal way to solve it ?
Thank you in advanced :)

How to access district by district name in antv using React js?

I want to create a map for showing the number of products selling in a particular district of India. in the backend, I have data like "West Delhi" name of the district and total count.I want to display the data in ant vision L7 district map. But not able to understand How they are consuming the data.

angularjs show table per field

I want to show the results of a MySQL query on my website using angularjs. For now, I'm showing them using a simple table with ng-repeat and it works with no problem. But because the data is a lot, I wanted to ask if it is possible to create multiple panels or tables per specific field.
To be more specific, I have 4 fields returned from the query: name, address, occupation, department. Right now I have a table such as:
George Smith Nikis 10 Project Manager Finance
Maria Bexley Lincoln 20 Project Manager Research
Chris Liggs Forks 123 Programmer Computer Science
etc. I want to know if I can create as many panels or tables as the unique values of the "occupation" field are and then show the results per that unique value inside each panel/table. So instead of the above table I would have something like:
Project Manager
George Smith Nikis 10 Finance
Maria Bexley Lincoln 20 Research
Programmer
Chris Liggs Forks 123 Computer Science
I think you need to use groupby filter
Check this fiddle by Darryl Rubarth, it contains the answer you need
http://jsfiddle.net/drubarth/R8YZh/
<div ng-repeat="item in MyList | orderBy:'groupfield' | groupBy:'groupfield'" >
You can use group by filter in ng-repeat with which you need to group

how to pre-fill some parts of an access form?

New here, so be gentle with me. - edited to simplify
I'm trying to set up something in Access where:
user selects driver name and date
query finds stops along the driver's route
form opens with route stops (location details) filled in and user can add additional information (item picked up, weight of item)
all information gets transferred to a "Pickups" table, which has data on what was picked up, the weight, where (route stop) and by whom (driver).
I have stores A through H, and three drivers, Bob, Tom, and Jill. Bob’s route is stores A,B,C,D. Tom’s route is stores A,C,G,H, and Jill’s route is stores D,E,F,G. (I can't give real names/locations - work is very strict about privacy issues!)
Behind these are “Driver” Table, with driver name, ID, and truck info; and “Store” Table, with store name (A-H), address, phone number, and contact person.
We’re collecting all of the information about items picked up at each store into a “Pickup” table, with Fields: Date, Driver, Store, WeightOfFurniture, WeightOfBooks, WeightOfClothes
The user starts with the driver’s name and date, clicks a button, and this opens a form with the following fields:
Driver, Date, Store, WeightOfFurniture, WeightOfBooks, WeightOfClothes
with driver and date filled in based on the initial entry, and “Store” having all listings for a given driver’s route. So I select Bob and a date (11-12) and get a form with:
Name Date Store WtFurn WtBooks WtClothes
Bob 11-12 A
Bob 11-12 B
Bob 11-12 C
Bob 11-12 D
I can get the above information from a query without any problem, but I can't figure out how to (partially) fill the form with the query results (there will be multiple query results for a given route, so DLookup is not useful).
I think recordsets might be a way to go, but not sure how to do this. I'm very new at VBA, but am learning (the hard way!).
Any suggestions?
Thanks!
Use an INSERT INTO action query to insert those records into your Pickup table.
I can get the above information from a query without any problem,
This query is the SELECT FROM part for the INSERT query.
Then open your Pickup form, filtered for Driver, Date and Store that you just inserted.

Resources