Solved

NULL Function in Workflow automation

  • 19 July 2023
  • 7 replies
  • 40 views

Hello,

I’m trying to fulfill automaticly a field when a task is created, and the function null I use for checking if the field is empty or not doesn’t work. Actually, my workflow automation looks like that: 

When a task is created,

If the fiel “email opportunity” is empty

Then (Action) Update task and fullfil this field with the related email adress. 

 

But the problem is that the workflow doesn’t work. See picture below:

NULL function not functioning
Result (nothing appears in the field email opportunity)

 

icon

Best answer by Michelle from Copper 26 July 2023, 22:25

View original

7 replies

Userlevel 7
Badge +7

Hi @sergio, thanks for posting!

I suspect it’s not an issue with NULL. I think it might be cf_Calendly_email.

Where do you fill out cf_Calendly_email? Is it on the related Opportunity record?

Workflow automation can only use information from the exact same record that triggered it. So your automation rule can only look at the Task you created with the blank/null Email Opportunity. It cannot reach over to a related Opportunity record to find information.

This is what I think is happening: the workflow automation is triggered successfully when a new Task is created where Email Opportunity equals NULL . So it checks that Task for cf_Calendly_email but it does not find anything. And so it leaves Email Opportunity blank.

Let me know if I understood correctly, and if you are filling out cf_Calendly_email  on your Opportunity records. Thanks Sergio!

Hi Michelle,

Thank you for your answer.

Actually, we fill out the field email opportunity (whi has the field key Calendly_email) in the opportunity records.

But I tried to create a similar workflow that actually worked : it’s a workflow with a different trigger but with the same outcome, which is filling out the field email opportunity in a newly created task (but this is for automaticly creatd tasks). You can see it on the picture below.

But now, I would like to create a workflow using the null function for manually created tasks, but as you said, it seems like the checking of the null field is okay, but it doesn’t find anything… When comparing those 2 similar workflows, I can’t understand why one works and not the other, since the only difference is in the trigger (which is an empty field for one and a field with specific text in the other). So, I wonder if the problem is in the trigger or not..

 

Userlevel 7
Badge +7

Hi @sergio, thanks for the additional detail.

When you use an Opportunity as a trigger, the automation can only use info from that Opportunity. It works because you filled in the Email Opportunity into when you created it. So the automation can copy and paste Email Opportunity from the Opportunity into the new Task.

When you use a Task as a trigger, it can only grab information from that Task. But that Task’s Email Opportunity is not filled out. So the automation is copy and pasting the Task’s blank Email Opportunity back into the Email Opportunity field… which leaves it blank.

Basically, if you want the workflow automation to fill out Email Opportunity for you, you must use the Opportunity as the trigger.

Let me know if I explained that well enough 🙂

Thank you very much Michelle, it’s cristal clear !

But my problem is that, I want the field email opportunity to be filled in automaticly if a task is created manually (for example, a task related to a person that I have already called and for which an opporunity already exists). 

Since I want the action of the workflow to be “fill in a task-related field”, the trigger can’t be different Opportunity, it must be Task. And so I meet the problem we discussed, with the field email opportunity left blank…

Do you have any idea to create the worflow I’m struggling to establish? Thanks in advance !

Userlevel 7
Badge +7

Hi @sergio, glad I could help!

So this is tricky because you want to create the Task manually but you also want the system to automatically take the email address from the related Opportunity. This is impossible to do if we are using the Task as a trigger. So… maybe we can find a way to use the Opportunity as the Trigger? 🤔

Here’s an example: I created a custom checkbox on Opportunities called “Create a Task for this Opp”

When I check the checkbox, a workflow automation does two things:

  1. It creates a Task for the Opportunity. And because the workflow automation was triggered from the Opportunity, it copies over the cf_Calendly_email!
  2. It un-checks the box (so that I can check it off again later to create another Task)

Here’s the Task it creates:

When I open that Task, I can see the Email Opportunity has been filled in: 

 

There is a downside - you will need to remember to create the Task using that checkbox. But that won’t be hard if you make it a habit :)

Here is the exact workflow automation I used for this:

 

Let me know if that helps! Thanks Sergio

Thank you very much! It’s very nice that you suggested me this solution, it’s a very good idea and I’m trying this and will test it during the next days!

Thanks again for the time and effort you did to give me an answer and a solution, and thanks for your reactivity !

Sergio

Userlevel 7
Badge +7

@sergio Glad I could help. Let me know how it goes when you try it out!

Just a heads up, I’m going to mark my previous comment as “Best Answer” so that others can find it easily. But this thread topic will stay open in case you have more questions about that workflow automation.

Reply