Clay Icon

How to Lookup Specific Job Titles and Write Contacts to a Table

Β·
Β·

Hey Team, Is it possible to lookup records based on a column input? I want to lookup multiple rows within a company but only lookup specific job titles. My workflow looks like this: #1 Identify the job function of a contact #2 Identify the job function they're hiring for on LinkedIn #3 Check a box if the function of the contact + the function they're hiring for matches #4 Write 3 contacts with the matched function (from the company) to another table Problem: Don't know how to lookup or write only 3 contacts to another table with the specific function (since the lookup multiple records) column searches for records randomly throughout the company Any solutions? Here's a video for context: https://www.loom.com/share/024adb3877234b09a274a0ba646ea6dd?sid=57bce2c7-b09f-4443-8eeb-b2b3157750ff

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To lookup and write only 3 contacts with a specific job function to another table, you can use a combination of "Lookup Single Row in Other Table" and "write to table" features. Here's how: 1. Use "Lookup Single Row in Other Table" to find contacts with the specific job function. 2. Create a formula column to filter and limit results to 3 contacts. 3. Use the "write to table" feature to send these 3 contacts to another table. 4. In the "write to table" setup, select your destination table and map the relevant data. 5. Use the formula column as a condition in the "Only run if" setting to ensure only the 3 filtered contacts are written. This approach allows you to control which contacts are looked up and written, rather than relying on random selection.

  • Avatar of Anthony C.
    Anthony C.
    Β·
    Β·

    helpful, but I'm confused on the "Lookup Single Row in Other Table" How are we supposed to limit the contacts to 3 per company and use that as an input for the "write to table" column? Thought it was "Lookup multiple Row in Other Table"

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    I apologize for the confusion. You're right, we should use "Lookup Multiple Rows in Other Table" instead of "Lookup Single Row in Other Table" for this task. Here's how you can limit the contacts to 3 per company: 1. Use "Lookup Multiple Rows in Other Table" to find contacts with the specific job function. 2. In the lookup settings, use the "Limit" option to restrict the results to 3 rows per company. 3. Use this limited result as input for the "write to table" feature. This approach allows you to control the number of contacts looked up and written per company.

  • Avatar of Anthony C.
    Anthony C.
    Β·
    Β·

    But the problem with that is that I can't control which job titles I write to the table

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To control which specific job titles are written to the table when using "Lookup Multiple Rows in Other Table", you can combine it with our "write to table" feature. Here's how: 1. Use "Lookup Multiple Rows in Other Table" to find contacts with specific job functions. 2. In the lookup settings, use the "Filter Operator" to specify the job titles you want. 3. Use the results as input for the "write to table" feature. 4. In the "write to table" setup, map the relevant data and use the "Only run if" condition to further filter the results based on job titles. This approach allows you to control which specific job titles are looked up and written to the table.

  • Avatar of Anthony C.
    Anthony C.
    Β·
    Β·

    But I need to make sure I write 3 job titles per company, if I use the Job Title as a Filter Operator then it will only write 3 contacts for the entire table

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·

    To write exactly 3 specific job titles per company to another table, you can use our "Find Employees at Company Based on Title" action combined with the "write to table" feature. Here's how: 1. Use the Datagma integration to find employees with specific job titles. 2. In the action settings, specify up to 3 job titles and set the number of employees to 3. 3. Use the results as input for the "write to table" feature. 4. In the "write to table" setup, map the relevant data from the Datagma results. 5. Use a formula in the "Only run if" condition to ensure you're writing exactly 3 results per company. This approach allows you to control the specific job titles and number of contacts written per company.

  • Avatar of Anthony C.
    Anthony C.
    Β·
    Β·

    No, I already have the contacts in the table. I need to lookup records that contain the matching job function -> limit it to 3 per company -> write to a new table

  • Avatar of Mark L.
    Mark L.
    Β·
    Β·

    Anthony, I just messaged your teammate Cody about this same table, same topic. Which one of you would be the primary on this? I don't want to duplicate efforts, or leave anyone out of the loop. Would you be okay if we close one thread or the other, and include both of you together in one conversation? ----------LBKSHey Cody, You have a lookup in place, which is a good start. Each cell in that lookup column basically returns a list. Based on that, you can use a formula to identify the position in that list for each row. In other words, we're telling Clay, "I have this list of people at the company, 1–22. In this row I'm concerned with [specific person]. Find out where in that list that [unique person] appears". And Clay will respond, e.g. "This person is in position 2 on the list". A video on this here: [https://www.loom.com/share/4152acbce75e4209a8db5d767050cf49](https://www.loom.com/share/4152acbce75e4209a8db5d767050cf49) (The UI is a bit older, but the principle is the same.) When that's done, you can write to another table based on each row's position ("Only run if position # is less than 3") High level, does that make sense? Could you try that, and let me know how it goes?LBKS

  • Avatar of Channeled
    Channeled
    APP
    Β·
    Β·