String split in offline mobile

Hello All,

As string split is server action its giving an error in offline mode. Is anybody having easiest way to handle this situation?

Thanks in advance

Prajakta Roshankhede

Hi,

Yes, you need this plugin: https://www.outsystems.com/forge/component-overview/1730/mobile-utilities

And you need to use this action: 

Regards!

Hi Prajakta,


Have you tried js to achieve this? please refer below link and check out the JavaScript for this

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split


Solution

Hi Prajakta,

You can achieve this with JavaScript having multiple output parameters.



Solution

Paulo Cação wrote:

Hi,

Yes, you need this plugin: https://www.outsystems.com/forge/component-overview/1730/mobile-utilities

And you need to use this action: 

Regards!

Thanks Paulo, will try this and let you know if it works. 

Preeti Kumari wrote:

Hi Prajakta,

You can achieve this with JavaScript having multiple output parameters.



Thanks Preeti, I found it easy and time saving solution and it is working perfectly in both online and offline mode.

Siddhant Chauhan wrote:

Hi Prajakta,


Have you tried js to achieve this? please refer below link and check out the JavaScript for this

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split


Thanks Siddhant.


Prajakta Roshankhede wrote:

Preeti Kumari wrote:

Hi Prajakta,

You can achieve this with JavaScript having multiple output parameters.



Thanks Preeti, I found it easy and time saving solution and it is working perfectly in both online and offline mode.

This solution works, but is not perfect. You don't have a dynamic output, and it is very hard to maintain.

If your slipt return less than 7 items? What will happen? will return "undefined" or an error..

And if split return more than 7 items? You will lost items...


Regards


Paulo Cação wrote:

Prajakta Roshankhede wrote:

Preeti Kumari wrote:

Hi Prajakta,

You can achieve this with JavaScript having multiple output parameters.



Thanks Preeti, I found it easy and time saving solution and it is working perfectly in both online and offline mode.

This solution works, but is not perfect. You don't have a dynamic output, and it is very hard to maintain.

If your slipt return less than 7 items? What will happen? will return "undefined" or an error..

And if split return more than 7 items? You will lost items...


Regards


Hello Paulo,


Yes you are right, this will work when we already know how many value we are going to have.


Preeti Kumari wrote:

Paulo Cação wrote:

Prajakta Roshankhede wrote:

Preeti Kumari wrote:

Hi Prajakta,

You can achieve this with JavaScript having multiple output parameters.



Thanks Preeti, I found it easy and time saving solution and it is working perfectly in both online and offline mode.

This solution works, but is not perfect. You don't have a dynamic output, and it is very hard to maintain.

If your slipt return less than 7 items? What will happen? will return "undefined" or an error..

And if split return more than 7 items? You will lost items...


Regards


Hello Paulo,


Yes you are right, this will work when we already know how many value we are going to have.


Hi Paulo, my use case is different. Where I am concatenating many variable value as a one string and passing it to different screen then again on back button splitting into original variables. So my variables are fixed.