Read quotes selected in a message

Hello everyone

How can I read the quotes marked in a message when clicking the quote button?

I just want that value to appear in the message when I select quote 10002 and press the “quote” button.

Many thanks in advance.

So far I have this,

@dcamlin

I can send a message based on the selection, but I can’t manage to display what was selected.

Part of the problem is QuoteHed.QuoteNum is an int. Dialog Show or Message Handler (which I tend to use) wants a string.

You can use ‘{yourbinding}’ and you should see the value… but it’ll include the outside single quotes:

image

But if you DON’T include the single quotes… it fails with an error: indexOf is not a function

This is because you’re passing an int instead of a string.

I tried various things like: String({mybinding})… and the result was literally: String(53143)

If you add some text before the binding in your message, it will convert it for you…

image

But I couldn’t find a way to JUST show the value unless I did the conversion first. For example, if you row-update the value into a TransView binding… you can set the value type to string… then it will display correctly.

image

I didn’t play around with multiple selection… but in those cases, you should be able to concatenate the string value your passing to the message handler.

The “Message” property doesn’t appear to be a JS expression property (why String() didn’t really work). Its some weird “binding-aware text interpolation” thing.

I WAS able to get it to show just the value if I use: {mybinding} ← you can’t tell easily… but there is just a trailing “space” after the binding. THAT was enough to get just the result value to show.

image

Thank you very much, that worked for me.