Function Return Message Help

Alright @jkane , here’s what I got. (@josecgomez made me to it)… and @hmwillett had to help me because it’s not intuitive. (“get rid of code” they said. “It will be easier” they said… But you still need magic strings with required syntax… you know… the hard part of code!.) But anyways… (we’ve already established I’m cranky today)

I made a super simple function. You call it, and it sends you back some strings.

Then went to ABC code and made my layer. Added a button to the layer so that I could get an event.

On the behavior of the button, you click on the event you want to go to, then it opens the button click event.

Drag an ERP-Function widget

In the properties, select your library and “Service operation” (apparently this isn’t consistent throughout the application. I would call it a method, but who am I)

For this simple of a function, that should be all that you need to do. For more complicated stuff, you’ll need to assign to datasets and stuff, but that’s beyond my expertise (I use that phrase lightly) level.

Then grab the message widget.

Go to “Advaced” “Param”

Here you set the type of message you want, the level, and finally, to my favorite… Magic string. {actionResult.yourResponseParam}

Now preview, and click the button, and a message popup, with my lame message.

Now, there are tons of caveats that @hmwillett started telling me that will come into play as you get into more complicated/realistic scenarios, but this is how you can pull a result from a function into a popup message.

2 Likes