Using A Checkbox Field To Decide Which Parent Tasks To Delete | Community
Skip to main content
Eric_D_Miller
Level 5
March 19, 2024
Question

Using A Checkbox Field To Decide Which Parent Tasks To Delete

  • March 19, 2024
  • 2 replies
  • 966 views

Hello,

I am attempting to utilize a checkbox field on a custom form (on a project) to automate the removal of the unselected options. Each option in the checkbox field matches a parent task being used for the incoming project so a 1-1 relationship does exist there.

For example. Checkbox Field Options: 1,2,3,4,5 Template Tasks: 1,2,3,4,5

If the incoming project has 1,3 and 5 selected then task 2 and 4 would be removed. I am trying to first get a record of each parent task in the project but don't see an option for listing out a projects tasks.

 

If it is worth nothing, each of the tasks I will be deleting is a parent task.

 

Thanks in advance!

-Eric

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

undu82
Level 2
March 19, 2024

You can use the template task ID to achieve the goal with a search module. So, just search using the template task id and it will bring you the id of the task that you need to delete

 

hope it helps

Eric_D_Miller
Level 5
March 22, 2024

This worked for returning my parent tasks

 

My next step is how I can utilize a checkbox field to help decide which of these parent tasks to delete. The checkbox field and parents tasks match 1-1 so it's a matter of how to map those checkboxes to the parent tasks. Any help will be greatly appreciated.

undu82
Level 2
March 22, 2024

1. Update the checkbox adding the template task id as a value

 

If you don't know how to get the template task id, go to the template

Select the task, and you will find the templatetaskid in the url

 

2. Get the checkbox (it will have the ID's that you don't want to delete)

3. Create an array with all the template tasks ID's

4. Iterate over the array, and compare if the array contains the ID, if it does, add a null and use a filter to finish the iteration, if it does not, delete. Something like this

And for the filter:

 


And that's it 🙂

 

 

KristenS_WF
Level 6
March 21, 2024

Hi Eric,

I'm pretty new to Fusion (so others may have a better, more efficient solution), but I created a test project in our sandbox and was able to identify the parent tasks using a custom API module: