0

Pretty sure this belongs to the Power Apps forum but I'm gonna try my luck here as well:

I have been encountering a simple issue about switching screens depending on the value of the dropdown data card I have. This is the current formula I have:

Switch(
IssueRequestType_Dropdown.Selected,
"Other", Navigate(GenericFormScreen, ScreenTransition.None),
"Manual Commission Adjustment Request", Navigate(CommissionAdjustmentFormScreen, ScreenTransition.None),
"Miscellaneous Adjustment Request", Navigate(MiscellaneousAdjustmentFormScreen, ScreenTransition.None),
"Write-Off Request", Navigate(WriteOffFormScreen, ScreenTransition.None),
Navigate(MainScreen, ScreenTransition.None)
)

My error keeps saying 'Invalid argument type (Text). Expecting a Record value instead'. Can someone please explain this?

All form screens are present in case that's relevant to my question. Thank you.

1
  • Try using IssueRequestType_Dropdown.Selected.Value instead of IssueRequestType_Dropdown.Selected.Value. Commented Oct 24, 2023 at 6:45

1 Answer 1

1

If you are using a drop down control in Power Apps, try using formula like below:

Switch(
    IssueRequestType_Dropdown.Selected.Value,
    "Other",
    Navigate(GenericFormScreen, ScreenTransition.None),
    "Manual Commission Adjustment Request",
    Navigate(CommissionAdjustmentFormScreen, ScreenTransition.None),
    "Miscellaneous Adjustment Request",
    Navigate(MiscellaneousAdjustmentFormScreen, ScreenTransition.None),
    "Write-Off Request",
    Navigate(WriteOffFormScreen, ScreenTransition.None),
    Navigate(MainScreen, ScreenTransition.None)
)

I have changed IssueRequestType_Dropdown.Selected to IssueRequestType_Dropdown.Selected.Value in formula.

Documentation: If and Switch functions in Power Apps

3
  • 1
    Hi Ganesh, Thanks for the suggestion. I actually ended up using the IssueRequestType_Dropdown.Selected.ColumName which worked. Commented Nov 1, 2023 at 20:20
  • Glad it is working for you now. Last part in formula is dependent on which control you are using (drop down or combo box) and the "items" property of the control. I am happy my suggestion helped you to get it working. Commented Nov 3, 2023 at 5:40
  • Hi @badsalvarado, can you please Upvote(^) and accept my above response as an Answer as it helped you & it will help others with similar question in future to find the correct answer easily. It also removes this question from "Unanswered questions" list. Thank you! Commented Feb 1 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.