Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Display the type of sort performed


moochieboochie

Recommended Posts

I have a field that shows the type of sort that was just performed on some data. ex. "sorted by sign number" "sorted by sign type". This works great to show the user what sort type they are looking at and will eventually print, but I need this field to change to "unsorted" if something is changed in the data which yields it to not be sorted correctly anymore. Such as a new record is added or a field that determines the sort type is changed. This will then notify the user that they need to sort again before printing. Is there a way to do this?

Link to comment
Share on other sites

If it's a calc field, you could use a Case statement such as

 

Case ( Get(SortState) = 2 or Get ( SortState ) = 0 ; "Unsorted" ; (and the rest of the conditions would follow).

Link to comment
Share on other sites

So I have a case statement in my calc field that says:

 

Case ( Get(SortState) = 2 or Get ( SortState ) = 0 ; "Unsorted" ; Get ( SortState ) = 1; Sorted By ; )

 

"Sorted By" is a hidden field that contains the type of sort

(ex. "by sign type" "by sign #") that was performed by a script button, globally.

 

When the button "sort by sign type" is pressed the script runs fine and the correct text is displayed in the calc field (essentially what is contained in the hidden "sorted by" field) but for some reason it does not work with the other button ("sort by sign #") is pressed. It displays a "?" in the calc field. I think it may have something to do with storing things globally??? Any ideas?

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use