1. CJ Lai
  2. PowerBuilder
  3. Friday, 21 October 2022 13:34 PM UTC

Hi all

I have a back-to-back TriggerEvent call in a control. It looks like this:

TriggerEvent('ue_event_1')

TriggerEvent('ue_event_2')

I need to get the ue_event_1's return value to determine whether or not to execute TriggerEvent('ue_event_2').

If I do this

ll_return_code = TriggerEvent('ue_event_1') the returned value is that of the TriggerEvent, not of the ue_event_1.

Is there a way to get the the returned value of ue_event_1 in the circumstance?

Thanks!

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 21 October 2022 14:08 PM UTC
  2. PowerBuilder
  3. # Permalink

There is a different syntax that you need:

return = objectname.Event eventname(arguments)

Look in the help file for this topic:

Syntax for calling PowerBuilder functions and events

Comment
  1. Chris Pollach @Appeon
  2. Friday, 21 October 2022 14:23 PM UTC
Hi CJ;

Roland is correct. You are using the original PowerSoft calling method as defined in PB version 1.0. This was updated to the newer syntax that Roland is alluding to in PB 5.0.

Regards ... Chris
  1. Helpful
  1. Roland Smith
  2. Friday, 21 October 2022 14:28 PM UTC
The return from TriggerEvent only indicates whether it was able to trigger the event. TriggerEvent is should only be used when the name of the event is in a string variable and there are no returns or arguments.
  1. Helpful
  1. CJ Lai
  2. Friday, 21 October 2022 14:32 PM UTC
Thank you, all. Greatly appreciate your input.
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.