# Create and link in one action

**URL:** <https://community.fibery.io/t/create-and-link-in-one-action/2391>\
**Category:** Ideas & Features\
**Tags:** rich-text\
**Created:** [January 13, 2022, 11:18am UTC](https://community.fibery.io/t/create-and-link-in-one-action/2391 "2022-01-13T11:18:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uniquelau](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/uniquelau/32/3836_2.png) [@uniquelau](https://community.fibery.io/u/uniquelau)\
**Post date:** [January 13, 2022, 11:18am UTC](https://community.fibery.io/t/create-and-link-in-one-action/2391/1 "2022-01-13T11:18:29Z")

</div>

Was there any progress with this?

Feels a bit painful to have to click into every task and set the relation when creating from a rich text editor.

In the end, we created a separate table view for each entity, that was filtered to only contained “orphaned” tasks (e.g. one’s without a relation set).

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [January 13, 2022, 7:03pm UTC](https://community.fibery.io/t/create-and-link-in-one-action/2391/2 "2022-01-13T19:03:32Z")

</div>

Here’s a little tip that can be used to speed up creation and linking of entities.

Imagine that you have Projects, which are linked to multiple Tasks. You want to create a Task and simultaneously link it to a Project.

You can add a symbols and extra text in the naming of the Task to indicate which project you want to link it to.  
In my example, I want to create a Task called ‘Task 1’ and link it to an already existing Project called ‘Project A’. To do so, I type the name of the Task as “Task 1\>Project A”.

Behind the scenes…  
I have a couple of automations.  
The first extracts the text to the right hand side of the arrow symbol and stores it in a text field called ‘Right hand side’:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/e/e54d469fce0854496d35c00605af923ab740dce4.png)  
The formula is as follows:  
`Middle([Step 1 Task].Name,Find([Step 1 Task].Name,">") + 1,999)`

Then I have an automation that uses this information to find the corresponding Project to which the task should be linked, and then removes the extra text from the name:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/3/34c66dbf8afddca628a8abec6cda59da5956fb92.png)

The formulas are as follows:  
`Projects.Filter(Name = [Step 1 Task].[Right hand side]).Sort().First()`  
and  
`Left([Step 1 Task].Name,Find([Step 1 Task].Name,">") - 1)`

The result of this is the following behaviour:  
When, for example, I want to create Task 1 for a Client - I can automatically assign it to Project A without needing to follow the normal flow of create, open and edit:  
 ![firefox_pErULY4wai](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/6/618ec160748754594d71a9f1b83b5b3f9263033c.gif)

The same behaviour occurs if you create a Task inline from within a rich-text field.  
 ![firefox_YWU8UHDh9r](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/1/13f0bba2d2aab9e3eb7897661cf375d22389a4fa.gif)

---

<div class="post-metadata">

**Author:** ![uniquelau](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/uniquelau/32/3836_2.png) [@uniquelau](https://community.fibery.io/u/uniquelau)\
**Post date:** [January 19, 2022, 1:02pm UTC](https://community.fibery.io/t/create-and-link-in-one-action/2391/3 "2022-01-19T13:02:05Z")

</div>

Hi Chris, this is an interesting solution.

I’m playing around with this at the moment, so will let you know how I get on.

Thanks, L

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [January 19, 2022, 11:13pm UTC](https://community.fibery.io/t/create-and-link-in-one-action/2391/4 "2022-01-19T23:13:07Z")

</div>

Related: [Make "creation context" available to scripts - #3 by Matt\_Blais](https://community.fibery.io/t/make-creation-context-available-to-scripts/2385/3)
