Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library


Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old November 12th, 2021, 10:24 AM
mjlongo mjlongo is offline
Junior Community Member
Join Date: Jul 2013
Location: Rochester NY
Posts: 47
Default Selecting a range of values

Hello, I have a job where the customer supplies 5 fields. F1, F2, F3, F4 and F5. They will either contain a zero or they will contain a numeric value. I have to select the range from the fields and print that range of fields when they are not zero. Fields inside the range can contain a zero. So for example:

F1=50, F2=100, F3=200, F4=300, F5=100: I print all fields.
F1=0, F2=100, F3=200, F4=300, F5=100: I print fields F2 through F5.
F1=50, F2=100, F3=0, F4=300, F5=0: I print fields F1 through F4.
F1=0, F2=0, F3=200, F4=0, F5=100: I print fields F3 through F5.
F1=0, F2=0, F3=200, F4=0, F5=0: I print only field F3.
I'm pretty sure I can come up with a long list of if statements to handle this but I'm also sure there is a smarter way. Maybe using some kind of test on an array? Any ideas on how to handle this would be greatly appreciated.
FusionPro VDP Creator 10.1.11

Last edited by mjlongo; November 12th, 2021 at 10:28 AM..
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 03:37 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.