Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

match a field to a list of values

Avatar

Avatar
Validate 1
Level 1
tarad4225910
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
tarad4225910
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
tarad4225910
Level 1

14-01-2021

Hi, I need to to display a field only if the Supplier number matching on in a list of values

 

 

some like 

 

if(FormPurchaseOrderRequest.frmShipAndBill.frmInfoBlock.txtSupplierID matches on of these values ('Y78DC','4568','PEN_V7','PNX_45','DC567'))
   then
       this.presence = "visible";
   else
       this.presence = "hidden";
   endif

list LiveCycle Designer
View Entire Topic

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

14-01-2021

Hi,

 

the best way it to check the input against an array of value.

var aList = ['Y78DC','4568','PEN_V7','PNX_45','DC567'],
    cInput = txtSupplierID.rawVaue, 
    bMatch = aList.some(function (cValue) {return cValue == cInput;});
this.presence = bMatch ? "visible" : "hidden";