Get two different values in the notify message

I have a Popup_Editor_Notify with argument "tr.List.Current.Prod.Cod+ "," + IsAvailable" to store two different values, then in other action I want to create a variable with the value in Prod.Cod and other variable with the value in IsAvailable.

 

The NotifyWidgetGetMessage() returns the two values but do you know how to acces each value separately? So that is possible to store each value in a different variable? 

If you only need to pass a couple of values, you can define a separator (a special character that you know will only be used to split your values), append the strings, send it in the Popup_Editor_Notify action, and then split the output of NotifyWidgetGetMessage() with String_Split.

Hi OsCaR_

The way I do is to use the String_Split function from Text extension.
You pass the message and the delimiter, and it will return you a Text List.

From there you can access the values separately (and eventually convert to the correct data type and store in variables, use, etc).

Cheers.

Eduardo Jauch wrote:

Hi OsCaR_

The way I do is to use the String_Split function from Text extension.
You pass the message and the delimiter, and it will return you a Text List.

From there you can access the values separately (and eventually convert to the correct data type and store in variables, use, etc).

Cheers.


Thanks so the NotifyGetmessage is the text that is passed in the function? It shows text data type required instead of text record list. 

It is an action that will return the message.

NotifyGetMessage.Message (if I remember well).

Cheers.

It shows data type requirwd instead of text record list. 

Do you mean the output of String_Split? It will be a text record list, you'll have to iterate or access specific records. Could you show us a screenshot of what you're attempting?

I have the Popup_Editor_Notify with argument "tr.List.Current.Prod.Cod"," + IsAvailable" then in other action 

using the NotifyWidgetGetMessage() I want to store the value in "tr.List.Current.Prod.Cod" in a variable and the value in "IsAvailable" in other variable.

The return of NotifyWidgetGetMessage is "8002,True".

Solution

Solution

Hello 


Other solution is to use a structure with the parameters you need to pass to the screen.

 you serialize the record to json and send the json on the notify.


On the other side you will get a message that is a json text  then you only need to deserialize to record and you have your record..


I made a sample so you can check both cases.


BR