1

I have a document library where Country and State are lookup columns.

When an new item is created in the list, i would like to trigger an email if the state that was selected is not part of that the selected country.

For example, if selected State was Gujarat and Country as USA, then i would like to trigger an email with the item details.

Thanks in advance!

  • What is your question? Is there a screenshot of your current workflow? – codeandfootball Jun 14 '16 at 2:43
  • 2
    I would suggest a change in your information architecture. Instead of two disconnected Lookup fields, only have a single Lookup for "State". Within the source list, each "State" should have an associated "Country" as a separate field value. Then as part of the "State" Lookup in the local list, you can use the 'Additional Fields' option (i.e. Projected Fields) to automatically pull in the "Country" for the selected "State". – Stevangelista Jun 14 '16 at 3:14
  • If you'd rather maintain the use of two Lookups, I would still create the "Country" column as part of the list containing "States". Then in your WF, you could compare the "Country" the user selected on the current list item to the "Country" value for the "State" the user selected. In a WF, you can look up data from another list using some value (i.e. the selected "State"). – Stevangelista Jun 14 '16 at 3:16
  • I agree with Stevangelista approach. @Stevangelista please put it in the answer section, so it can be marked as Answer. – bkk Jun 14 '16 at 9:19
  • Why do you want to allow the user to add an item with wrong values and then trigger a workflow to intimate the user saying that you have selected wrong state and country. Just an idea, why dont you restrict the user to select the state based on the country selected. Example, if a user selects India, then user will be able to select only Tamilnadu,Gujarat,Karnataka. Why do you want to make the process lengthy? Is that really required? – Nagarajan Muthukumar Jun 14 '16 at 11:06
1

I would suggest a change in your information architecture.

Instead of two disconnected Lookup fields, only have a single Lookup for "State". Within the source list, each "State" should have an associated "Country" as a separate field value.

Then as part of the "State" Lookup in the local list, you can use the 'Additional Fields' option (i.e. Projected Fields) to automatically pull in the "Country" for the selected "State".

UPDATE

Screenshot example of setting up a Lookup column with Additional Fields: enter image description here

  • Hi Steve, Thanks for your quick response. Can you please provide snapshots to have a clear idea that would help more. – mallela prakash Jun 14 '16 at 15:02
  • To be more simple consider this scenario: I had a column A with value India and Column B with 4-5 values. So, How do i create a workflow such that an email triggers when the Column A matches the value India and Column B with all values – mallela prakash Jun 14 '16 at 16:40
  • As @bkk agreed, the use of a WF to compare the values is unnecessary - if you configure the "State" Lookup column correctly, it will be impossible for the user to select a "Country" that doesn't match because they won't be selecting a "Country" at all. They'll only be selecting a "State" and that State's Country will automatically get pulled in. See my updated answer for a screenshot of enabling Additional Fields on a Lookup. – Stevangelista Jun 14 '16 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.