/* Search a Question in Formset scope using its QuestionId. */
HII_STATEMENT* QuestionIdInFormset(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN UINT16 QuestionId)
/* Search a Question in Formset scope using its QuestionId. */
HII_STATEMENT* QuestionIdInFormset(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN UINT16 QuestionId)
{
  LIST_ENTRY     *Link;
  HII_STATEMENT  *Question;
  if ((FormSet == NULL) || (Form == NULL)) {
    return NULL;
  }
  Question = QuestionIdInForm (Form, QuestionId);
  if (Question != NULL) {
    return Question;
  }
  Link = GetFirstNode (&FormSet->FormListHead);
  while (!IsNull (&FormSet->FormListHead, Link)) {
    Form = HII_FORM_FROM_LINK (Link);
    Question = QuestionIdInForm (Form, QuestionId);
    if (Question != NULL) {
      if (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
        GetQuestionValue (FormSet, Form, Question, GetSetValueWithHiiDriver);
      }
      return Question;
    }
    Link = GetNextNode (&FormSet->FormListHead, Link);
  }
  return NULL;
}