Button to copy logged text to a parent table

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a Projects table. Each Project has many tasks. The users can enter text comments for each task. Is there any way via button or script that these comments can appear back in a report on the Projects table?

I know I can't have a summary field with text, like I can with numbers. But is there a script that the user can run after entering the Task comments to copy those comments to the related Project?

Photo of Michael

Michael

  • 20 Points

Posted 3 years ago

  • 0
  • 1
Photo of Neal

Neal

  • 70 Points
Hi Michael, Are you trying to do the following? Thanks, Neal NealPatil @ gmx.com T1,T2,T3,T4,T5 are tasks P1, P2, P3 are projects Task Link T1-P1 will take you to Task1 of Project1. Comment link Comment1-T1-P1 will take you to Comment1 of Task1 of Project1.
Photo of Neal

Neal

  • 70 Points
Hi Michael,

Are you trying to do the following?

Thanks,

Neal


NealPatil @ gmx.com

Note : I found out that comments do not allow uploading of file. So I am putting my comments in answer section which allows uploading of file.


T1,T2,T3,T4,T5 are tasks

P1, P2, P3 are projects

Task Link T1-P1 will take you to Task1 of Project1.

Comment link Comment1-T1-P1 will take you to Comment1 of Task1 of Project1.



Photo of Michael

Michael

  • 20 Points
Neal, thanks for the reply. Currently I have the Comments as a text field in the Tasks table, so while in the Tasks form, the users can just add their comments without too much effort. Comments are not in their own table related to the Projects or Tasks table.
Photo of Neal

Neal

  • 70 Points
Hi Michael, Thanks for reply. As comments is a text field in Tasks table, user can enter maximum 1 comment per task. I will provide corrected screenshot prototype. Thanks Neal . NealPatil @ gmx.com
Photo of Neal

Neal

  • 70 Points
Hi Michael,

Corrected Screenshot Prototypes are attached.

Thanks,

Neal

NealPatil @ gmx.com

Photo of Michael

Michael

  • 20 Points
Your screenshot is correct prototype is correct, however, the comment should be able to be modified as the project goes along, so it can't be a one-time and done field. It does not need to be a logged field, but just a multi-line open text field.
Photo of Neal

Neal

  • 70 Points
Hi Michael,

Yes - Comments can be modified as needed. Comments is part of Task - so Modification of Task will provide modification of Comments. As modification of Task-Comment is important for you I have also added Link for modification of Task-Comment while viewing project details. Also comments are Multi Line in the attached screenshot prototype. Task Link in Project Details will result into corresponding  Task record for project and modification of Task  can be used to modify comment, but it will involve two clicks

  1. Click Task Link
  2. Click modification/edit of Task for modification of comment

Direct modification link of Task in project details will be one click operation for modification of comment.

Thanks,

Neal

NealPatil @ gmx.com
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
Normally in these situations, the goal is to float up the most recent say X number of comments from the child record up to the Parent, say for the example the 5 most recent comments (and perhaps a "more" indicator if there are more than 5..  If that is good enough for you, post back and I can help you set up the looping relationships to do that.
Photo of Michael

Michael

  • 20 Points
Mark, thanks, that would be great. Thanks.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
OK, here goes:

One Project has many Tasks.

1. Create a summary maximum of the [Record ID#] of Tasks, subject to the filter where comments is not blank.  Call it [Record ID# of 1st Most Recent Task with Comment]

2. Create a new relationship where 1 Task has many Projects. Yes this is backwards, and hence generally called a reverse relationship.  On the right side of the relationship, do not let QuickBase create a new field, but rather choose the field called [Record ID# of 1st Most Recent Task with Comment].

3. Get rid of the clutter on the left side of the relationship. Delete the report link field and the Add Project fields.

4. Look up the Comment field from the Task to the Project and called it [Most Recent 1st Comment].  Great, now the project record knows the 1st most recent comment.

5. Go back to the main relationship where One Project has many Tasks.

6. Look up that field [Record ID# of 1st Most Recent Task with Comment] down to the tasks table.

7. Duplicate that Summary Maximum field for [Record ID# of 1st Most Recent Task with Comment] and edit its setup to add a filter where the Record ID# is less than the value of [Record ID# of 1st Most Recent Task with Comment].   Call it [Record ID# of 2nd Most Recent Task with Comment].

8. You will notice that conveniently, when you duplicated that field for [Record ID# of 1st Most Recent Task] it will have also duplicated the reverse relationship.  Edit that new Relationship to pull down the comment field and call it [Most Recent 2nd Comment].

Basically just keep doing the same thing over and over for say 5 loops.

Then make a field to list all the comments vertically in a field called [Most Recent 5 comments]

List("\n",

[Most Recent 1st Comment]


[Most Recent 2nd Comment]


[Most Recent 3rd Comment]


[Most Recent 4th Comment]


[Most Recent 5th Comment])


if you like you can also do a summary count of the # of Tasks with Comments. and then update that formual above with a suffix of

& IF([# Tasks with Comments] >5, ".....  and more, see project record)
Photo of Michael

Michael

  • 20 Points
Thanks for the answer, I see how that will work. Unfortunately, there is a wrinkle. My Task key is not the numerical Record ID# anymore, it's a calculated formula text field which concatenates Project # (i.e. 1, 2, 3, 4, etc.) and Task # (SC10, FI20, etc.) for a key that looks like "1-FI20". By nature each project can only have 1 set of tasks, and this prevents users from creating duplicate tasks for the same project, and also allows for easy import of task updates since the user may know 1-FI20, but may not know Record ID# 38551.

Because the key is a text field, I'm not able to use this as a summary maximum. I can use an autonumber numerical field to create [Record ID# of 1st Most Recent Task with Comment], but then I'm not able to create the reverse relationship using a non-key field.

Am I SOL unless I change the key field?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
Yes, unfortunately "SOL" is the appropriate term for your situation.  QuickBase Engineers are well away of the need to be able to float up text from a text field on child records up to the Parent, as it creates not only user hassle but app performance issues they need to deal with to calculate all those loops.

My only other thought is to make a summary report off the child Tasks table to summarized based on Rows group by Project Name and group by Comment field.  Give that a try as its a quick thing to try and maybe as an alternative to SOL it's better than nothing.