Skip to main content
Nintex Community Menu Bar
Question

Move selected item to top of queue

  • July 10, 2024
  • 6 replies
  • 41 views

Forum|alt.badge.img+3

I am attempting to have ti so that when you click on an item in a queue it moves to the top of the queue.  I have created a checkbox on my object called Pinned (pinned__c) and have the following queue item actions:

  • Show Message and Block UI
  • Update a Field on Row (Pinned__c=TRUE)
  • Save Model Changes
  • Query Model
  • Unblock UI
  • Run Snippet (the snippet performs Update Page Include)
The model is sorted by Pinned__c.  The box will show as checked on the Page Include, but not on the queue (so the selected item in queue doesn’t go to the top).

6 replies

Forum|alt.badge.img+3

The sequence of action should be - 
Update a field value  (pinned_c = true)
Requery model
If your model has order by pinned asc/dsc, this should move selected item to top.


Forum|alt.badge.img+18

Vivek,

Curtis will get an error if he attempts to query after updating. You can’t query a model with unsaved changes.


Forum|alt.badge.img+18

Curtis,

Try running a one-line snippet like this right after your query action:

skuid.$C(‘MyQueueComponentId’).render();

Replace MyQueueComponentId with whatever the Unique ID of your queue component is.

Does that work?


Forum|alt.badge.img+7

Hi Curtis

I used the Account Object as a test.  I added a a checkbox field to the object.

I created a Skuid page with the Accounts Model in it and added ‘Pinned__c DESC’ in the ‘fields to order records by’ model properties.

In the Queue properties ‘Item Action’ I set the ‘Item On-Click Action Type’ to multiple actions.

On the ‘Actions’ property I added:

FIRST ACTION
Action Type = Update a field on row(s)
Model = ‘MyModel’ (in my case AccountMod1)
Field = Pinned__c
Value = √

SECOND ACTION
Action Type = 
Save Model Changes
Model to Save = AccountMod1

THIRD ACTION
Action Type = Query Model
Model = AccountMod1
Query Behaviour = Standard-Completely Replace Data

This brings all the pinned models to the top.


Forum|alt.badge.img+3

That worked, thanks


Forum|alt.badge.img+7

Very welcome.

Happy Skuiding!