Is the Function I Want Possible with Scripting (or Anything I Can Learn?)

  • 1
  • 2
  • Question
  • Updated 2 years ago
  • Answered
I'm ready to learn scripting (or whatever it takes) to create a certain functionality in my Project Manager app--but I'd like

  1. to make sure it's possible and, if so,
  2. any help on what direction I should go--(i.e., what I should learn as soon as I have the basics)
My Project Manager app has a Tasks table with a table report which lists all incomplete tasks in a number order (e.g., by a [Sort Order] field).

The special function I need to create is to allow the user to easily:

  • insert a task at a point in this list and have tasks before the insertion point renumber automatically or easily
  • delete a task at a point in this list and have tasks after the insertion point renumber automatically or easily
  • 'bump up' or bump down' a single task and have the tasks before or after it renumber automatically or easily
  • 'bump up' or bump down' a group of tasks and have tasks before or after renumber automatically or easily
I think the last function is the most complex one I need to accommodate.

Natively, it's impossible to create as many reverse relationships as would be needed for the tasks to 'look at' and respond to an ordinal, insertion of any sibling tasks.

Essentially, the desired functionality can be accomplished with several steps in Grid Edit -- but when a list has several hundred tasks, this becomes complex and unwieldy.

The idea's been pitched of users making us of decimal places in the sort order field--but we don't want users to have to create increasingly order increments every time they want to adjust the list.

ANY HELP OR IDEAS GREATLY APPRECIATED!

Thank you so much!!!

Photo of Amber

Amber

  • 590 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
  • 2
Well I'm not sure this will help, but a low tech solution is to cause the initial task lists,  which perhaps are being auto generated using the Copy master Detail functionality off a standard Project task template, to number by 10's or 20's or even 100's.  But let's say 20's.  Then to insert or move a task the users would be doing a grid edit and not having to enter decimals.  Perhaps that is more acceptable to the users.

If you want to see a list of tasks and have them numbered sequentially, you can make a summary report and include a field with a formula value of 1.  Then set it to show as a running total down the column.  Those will not be the task sort numbers, but they will number from 1 to X.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
This is an interesting question. This certainly is possible but the question is how to do it with minimal impact on QuickBase's native features. Here is one idea using jQueryUI sortable

http://jsfiddle.net/sjf5wyho/2/embedded/result,js,css,html/


You can move the rows around by left mouse clicking on a row and dragging it. A little logic in script would allow you to auto-renumber the rows, delete rows, add rows and save the configuration back to QuickBase. I used API_GenResults table to generate this table only because a normal QuickBase report has a mouseover handler that interferes with grabbing a row and it would be a little bit of work to sort out how to disable the mouseover handler so you could drag the row around..

UPDATE: I cannibalized the last field in each row ([Examples]) to update the index of the row after a sort.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
In this report you can drag the rows around and Save the current ordering of bloggers.

QuickBase Bloggers ~ List All
https://haversineconsulting.quickbase.com/db/bmguzsp87?a=q&qid=1

The other functions you want (edit, delete) can also be implemented in this example with a little more code. In a production application I would do a few additional things. Everything is possible.Now back to reading the QuickBase blog - it is so much fun.

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=543

If you need assistance implementing this solution fee free to contact me using the information in my profile:

https://quickbase-community.intuit.com/users/513/
Photo of Amber

Amber

  • 590 Points 500 badge 2x thumb
Beautiful solution! Thanks so much!