Specific Text in Comments

I want to get a list of tasks from a specific folder where a specific comment was made in the last 24 hours. 

I don't see that there's a way to pass in a string/variable to the API get call for comments like you can for other items (tasks, projects)

e.g., something like this:
/folders/{folderId}/comments?text="hello" ... or ? text['hello']
/folders/{folderId}/comments?updatedDate {start,end} 

Don't think I am able to use updatedDate on a folder level, and not sure about searching the text from the string either.

Does anything like that exist?

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
1 comment

I don't know of a way to do this using the API, but can be easily done with whatever language you are using

 

first create a list of text contained in each comment, then search each item for a substring:

 

JS

// Create an array of strings 
const myList = ['apple', 'banana', 'orange', 'kiwi'];

// Define the substring to search for
const mySubstring = 'an';

// Loop through each string in 'myList' and check if substring is present
myList.forEach(item => {
if (item.includes(mySubstring)) {
console.log(`Found '${mySubstring}' in '${item}'`);
}
});

python

# Create a list of strings 
my_list = ['apple', 'banana', 'orange', 'kiwi']

# Define the substring to search
for my_substring = 'an'

# Loop through each string in 'my_list' and check if substring is present
for item in my_list:
if my_substring in item:
print(f"Found '{my_substring}' in '{item}'")

 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: Specific Text in Comments
[this list is visible for admins and agents only]

Top
Didn’t find what you were looking for? Write new post