Skip to main content
Participating Frequently
July 29, 2019
Answered

Pull Export Values from Checkboxes to Show in a Text Field

  • July 29, 2019
  • 2 replies
  • 1573 views

I'm having some issues with this script. I've used it successfully, but slightly different than this version.

I have confirmed each checkbox has a export value, but I can't get it to display the checkboxs' export value within the text field I have it assigned to.

I'm using this in the "custom calculation" section:

var ybl = this.getField("Length.Youth").value ;

var abl = this.getField("Length.Adult").value ;

if(ybl <= 31) {

    event.value = (ybl.value) ;

}

if(abl >= 32) {

    event.value = (abl.value) ;

}

This topic has been closed for replies.
Correct answer try67

This is the error I'm getting:

InvalidSetError: Set not possible, invalid or unknown.

Event.value:14:Field PlayerBatLength:Calculate (the "event.value:XX" will change from 11, 14, 17 depending on the size checkbox selected)

I don't think I share with the world at this point.


Bernd is right. Change these lines:

event.value = (ybl.value) ;

event.value = (abl.value) ;

To:

event.value = ybl;

event.value = abl;

2 replies

Bernd Alheit
Adobe Expert
July 30, 2019

A value of a value makes no sense.

try67
Adobe Expert
July 30, 2019

What if both of these conditions are true? Or neither?

Participating Frequently
July 30, 2019

They cannot both be true, as the the Length.Youth only goes up to 31 and the Length.Adult starts at 32 and goes up.

try67
Adobe Expert
July 30, 2019

OK. So what exactly is the issue? What do you see in the field?