Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Drop Down List using previous fields

New Here ,
Oct 31, 2022 Oct 31, 2022

I am trying to create a World Cup Sweep sheet.

 

I have made up drop down lists with winners and runners up in groups.

 

Trying to create a new drop down list to show selections from the above.

 

E.g. If someone listed 1 of the last 16 matches as Netherlands v USA and the next as Argentina v Denmark.  I am looking to get a drop down for quarter final 1 to show as either Netherlands or USA and another drop down as either Argentina or Denmark?

Campbell26883420mqlw_0-1667225833410.pngexpand image

 

Is this possible?

 

TOPICS
PDF forms
509
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2022 Oct 31, 2022

You can populate dropdown fields using setItems().

Since there are no more groups after stage 1 wouldn't be easier to use a text field to populate country name instead of a dropdown field?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 31, 2022 Oct 31, 2022

I am trying to make it so that you only get to choose between the teams entered in the previous round.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2022 Oct 31, 2022
LATEST

Use this as validation script of "1st Group A" field:

var C = ["Choose L1 Winner"];
var gb = this.getField("2nd Group B").valueAsString;
if(event.value != "Choose" && gb != "Choose"){
C.splice(1);
C.push(event.value,gb);}
else
C.splice(1);
this.getField("L1 Winner").setItems(C);

Use this as validation script of "2nd Group B" field:

var ga = this.getField("1st Group A").valueAsString;
if(event.value != "Choose" && ga != "Choose"){
C.splice(1);
C.push(ga,event.value);}
else
C.splice(1);
this.getField("L1 Winner").setItems(C);

I can't see on your photo but if "Choose" is not the default value, change it.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines