draco66 Posted October 11, 2016 Share Posted October 11, 2016 I need some help with determining if the printed piece will say "result" or "results" based on several fields. There are five fields that will either be empty or contain an "x". If more than one of the five fields has an "x" in it then we need to return the plural "results". Otherwise if only one of the five fields has an "x" in it we return "result". This is probably very easy but my scripting skills are basically limited to copy and paste from all the wonderful help people post on this forum. Thank you. Bob M. Quote Link to comment Share on other sites More sharing options...
step Posted October 11, 2016 Share Posted October 11, 2016 var fields = [Field("1"), Field("2"), Field("3"), Field("4"), Field("5")].filter(String); return fields.length > 1 ? 'results' : 'result'; Quote Link to comment Share on other sites More sharing options...
draco66 Posted October 11, 2016 Author Share Posted October 11, 2016 Thank you for the fast reply. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.