Page 1 of 1

messages

Posted: 11 Dec 2018 10:57
by Rafi4
Hi all
in this flow and widgets I want to get SMS sender name and message separately. how can I get? any help?
I want to read messages without going to my messages application. any suggestions please post.

now I am getting message as example
"+9190000095040I am too busy now". in this example I want to separate sms sender name and message as
sms sender name at the top of the widget and message in message body. I am uploading 3 flows and one widget
please correct them and upload.

thanks from record

Re: messages

Posted: 11 Dec 2018 16:27
by Desmanto
As I check your "message create" flow, there is script to add

Code: Select all

addMapEntry(global_message_map,a,sms_sender+ sms_text);
This is where the sms sender and sms text being concatenated. You shouldn't concat them like that, if you still need them separately. You can store them in list format, but it will change the way you show the message (using the list element). At least, if you still have to combine them, add some separator char in between. Example, for your case, it is easier to add line break "\n". you entry map will be

Code: Select all

addMapEntry(global_message_map,a,sms_sender + "\n" + sms_text);
This will make the text store as

Code: Select all

+9190000095040
I am too busy now
If you need to separate it again, you can just split it by using "\n".

Your widget will automatically show the line break too. So there is not much to change for now, simply add + "\n" in between

Re: messages

Posted: 11 Dec 2018 22:47
by Rafi4
hi Desmanto
thanks a lot. thanks for your solution.
you are genius.

thanks from record4