Skip to main content

Hi All,


I need to detect if a field in mobile isn’t contains only spaces. 
I want to do this via a script, I know this is easy to achieve via Javascript, but I understand vanilla Javascript isn’t supported in FSM? I’m only allowed to use the build in functions from IFS? 

Regards,

Hey @drooij 

You are correct, JavaScript is not supported by IFS platform. You need to use the internal API which has JavaScript like syntax.

One idea you can try

Create an SQL script to check if the field value has spaces in it.

select count(*) from <YOUR_TABLE>
where <YOUR_COLUMN> like '% %'
and <YOUR_COLUMN_ID> = <ID>

Then check if the result has any value larger than 0.  If result is bigger than 0, there are spaces in the field value, else no spaces.

I believe there are more/other ways, but this is the first thing that came into my mind.

Cheers!


Reply