Page 1 of 2

hide some text from key value

Posted: 08 Jul 2019 15:11
by Rafi4
hi all
I think this is may not possible. if key value is(in map) "today is 8th July". how can I ignore the text "today is"?
I want to get only the text "8th July" in Statusbar .

thanks from record4

Re: hide some text from key value

Posted: 08 Jul 2019 16:33
by Desmanto
Using key in map require exact match. If you need only partial match, you need to loop upon the key and can use either regex or simple contains(). I don't know yet, how you want to ignore the text "today is". Do you mean to search for "today is" and then remove it from the search result, or do you mean to search only for "8th July" in the key and then remove any other text from the key, which is not the keyword?

Re: hide some text from key value

Posted: 08 Jul 2019 20:14
by Rafi4
hi desmanto
because I want to using this flow for multiple reminders. working very amazing and fantastic. not only one I am creating reminders more than one with one global variable date and time.now i am saying that triggertime is the map key and key value is triggertime ++ my reminder. in notification I am getting triggertime +reminder . I want to ignore the triggertime in notification.

for example =
map key = triggertime
key value = triggertime pay electricity bill (my reminder).

I want to get the pay electricity bill text in notification. I want to ignore the text triggertime in notification.


thanks from record4

Re: hide some text from key value

Posted: 09 Jul 2019 17:07
by Desmanto
That is one smart way to use the glovar map with glovardt. It saves you tons of glovar and allow multiple glovardt addition.

Actually you can ignore the triggertime part using regex. But instead of solving the problem, why don't just create the map as you want from the beginning.
From the create reminder flow, you have the script

Code: Select all

schedule=value;
addMapEntry(global_4,schedule,"{schedule}  {note}");
You add the {schedule} inside the value. If you don't add it, you can have the {note} alone when using the glovar. The Script will become

Code: Select all

schedule=value;
addMapEntry(global_4,schedule, note);
This doesn't affect your glovar key, it simply affect the value. And you only need to save the note, as the triggertime already included in the key (so no need to save it twice).

Re: hide some text from key value

Posted: 09 Jul 2019 18:18
by Rafi4
hi desmanto
I want to get the reminder Note by sorting the values. so I need the triggertime in note key value.

thanks from record4

Re: hide some text from key value

Posted: 09 Jul 2019 18:24
by Desmanto
But you sort the key, not the value. Since the key contains the schedule time too, then you already get what you need by sorting the key, no need to sort the value anymore.

Re: hide some text from key value

Posted: 10 Jul 2019 01:12
by Rafi4
hi desmanto
because I want to convert the key value into global variable date and time.
thanks from record4

Re: hide some text from key value

Posted: 10 Jul 2019 17:29
by Desmanto
You need the glovar datetime, but that glovar datetime already provided by the key, not the value. Just try to remove the {schedule} and test to create a reminder and see how it works out.

Re: hide some text from key value

Posted: 12 Jul 2019 08:15
by Rafi4
hi desmanto
I can't understand much. please modify the flow and post.

thanks from record4

Re: hide some text from key value

Posted: 14 Jul 2019 15:15
by Desmanto
I can' test your flow, since you have other glovar depend on it too. You simply have to edit the script at the flow Create Reminder, it is the 5th element, after the expression. Remove the {schedule} as shown at my post 4.