Hi, you would need to use loop if you allow the user to select multiple college codes.
If you allow user to select only one value you can use this code, see this, copy paste into your pad.
Tip - it is faster to edit the code in text if you need to add many value options.
@@statistics_Input_ChoiceSet: '4'
@@statistics_Action_Submit: '2'
Display.ShowCustomDialog CardTemplateJson: '''{
\"type\": \"AdaptiveCard\",
\"version\": \"1.4\",
\"id\": \"AdaptiveCard\",
\"body\": [
{
\"type\": \"Input.ChoiceSet\",
\"id\": \"ExamCode\",
\"style\": \"compact\",
\"isMultiSelect\": false,
\"choices\": [
{
\"title\": \"2201\",
\"value\": \"2201\"
},
{
\"title\": \"9999\",
\"value\": \"9999\"
}
],
\"label\": \"${ExamCode_Label}\"
},
{
\"type\": \"Input.ChoiceSet\",
\"id\": \"CollegeCode\",
\"style\": \"compact\",
\"isMultiSelect\": false,
\"choices\": [
{
\"title\": \"3001\",
\"value\": \"3001\"
},
{
\"title\": \"3003\",
\"value\": \"3003\"
}
],
\"label\": \"${CollegeCode_Label}\"
},
{
\"type\": \"Input.ChoiceSet\",
\"id\": \"SubjectCode\",
\"style\": \"compact\",
\"isMultiSelect\": false,
\"choices\": [
{
\"title\": \"1\",
\"value\": \"1\"
},
{
\"title\": \"2\",
\"value\": \"2\"
}
],
\"label\": \"${SubjectCode_Label}\"
},
{
\"type\": \"Input.ChoiceSet\",
\"id\": \"Year\",
\"style\": \"compact\",
\"isMultiSelect\": false,
\"choices\": [
{
\"title\": \"2022\",
\"value\": \"2022\"
},
{
\"title\": \"2021\",
\"value\": \"2021\"
}
],
\"label\": \"${Year_Label}\"
}
],
\"actions\": [
{
\"type\": \"Action.Submit\",
\"id\": \"Submit\",
\"title\": \"${Submit_Title}\"
},
{
\"type\": \"Action.Submit\",
\"id\": \"Cancel\",
\"associatedInputs\": \"none\",
\"title\": \"${Cancel_Title}\",
\"IsCancel\": true
}
]
}''' CustomFormData=> UserInput ButtonPressed=> ButtonPressed @ExamCode_Label: $'''ExamCode''' @CollegeCode_Label: $'''CollegeCode''' @SubjectCode_Label: $'''SubjectCode''' @Year_Label: $'''Year''' @Submit_Title: $'''Submit''' @Cancel_Title: $'''Cancel'''
IF ButtonPressed = $'''Submit''' THEN
SET URL TO $'''https://www.nu.ac.bd/admit/desc_all/%UserInput['ExamCode']%_%UserInput['CollegeCode']%_%UserInput['SubjectCode']%_%UserInput['Year']%.pdf'''
# do something with url here
ELSE
EXIT Code: 0
END