Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Double click a portal item


This topic is 7074 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I would like to know if it is possible to be able to double click on a portal item and have it perform a script (to go to related record). If i make the portal fields buttons they work on a single click only.

Thanks

Posted

Hi Karma,

I'm afraid I'm not following your reasoning. Why require double-click instead of single? If Users want to double-click, let them. The script will fire on their first click anyway. They may think their double-click activated the script when, in fact, it just wasted a click.

I have Users that still double-click many times. It's never been a problem. Am I missing something here?

LaRetta

Posted

well i sort of solved it by putting a button in but...

why i wanted it was so that one wasn't selected by mistake, that if they highlighted it (one click) it wouldn't be selected. not quite sure if this explains it...

Posted

Hmmm. A GTRR by itself may (or may not) be something you need to tightly control; but in truth, all scripting should be tight, I think. Whether serious or not I would trap within the script itself if User needs a second chance, ie,

User clicks button (or transparent rectangle overlay button) and ...

Custom Dialog [ Yes; No; Message "Are you sure you want to do this?" ]

If [ Get(LastMessageChoice) = 2 ]

Commit Records/Requests

Exit Script

Else

... run your regular process here

End If

Note: If the action could be dangerous, put the NO as the default (leftmost) button. In this way, the far-right button for the User (the one they would most likely want to choose) will cancel the operation. And turn around the test above, ie,

Custom Dialog [ No; Yes; Message "Are you sure you want to do this?" ]

If [ Get(LastMessageChoice) = 1 ]

Commit Records/Requests

Exit Script

Else

... run dangerous action here

End If

But keep in mind that Show Custom Dialog will only accept User field input on accepting the default button. So if your regular process (whatever happens when they actually activate the button) contains any setting of fields from User data and is dangerous, use a second Custom Dialog (during the 'Else' portion) to accept the input and keep the first dialog only to stop or proceed with the process.

Include the approrpiate Allow User Abort[Off] and Set Error Capture[On] (or other steps) as needed.

You could also set a number field to track clicks but I would discourage that method. If you use a global, User could click a different portal row and activate it; if you use a standard number field, a different User could activate it by accident after a first User clicks it once. Or you could get fancy and write the IDs to a multiline and Position() or PatternCount() them, but why bother?

Again, since I don't know why it's important to give them a second chance, I can't offer much more than this. wink.gif

LaRetta

Posted

I like your file, mse!! smile.gif

The reason I would be concerned with flagging using a number, as I mentioned above, is that the script will be fired in a PORTAL so multiple records are exposed to the same button simultaneously; unlike the main record where only one record is accessible at a time. Which is why I suggested that if global number is used, it might be best to capture the uniqueID.

What is to stop the user from clicking the button in one row then immediately clicking the button again in a different row and activating the script? Because the first row click will set global1 and the second fire of the button will set global2, no?

I'm unsure if it could happen quickly enough but does not the possibility exist for mis-fire on the wrong record if that happens? It's much better than using a 1 flag for sure but I'm unsure if it's better than using a unqiueID and testing if there is a match ID in the global before firing.

Just speculating ... wink.gif

This topic is 7074 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.