web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / First action doesn't r...
Power Apps
Unanswered

First action doesn't register

(0) ShareShare
ReportReport
Posted on by 41

In my app when a user clicks the submit button the first action is to decide what action they clicked based off a "status" control. The rest of the logic is some checks then the submit. The action noted is saved in a comments column in the SharePoint list backend. It worked fine this whole time until just about the start of this month (6/2021). Now the app acts like it doesn't recognize the first action, proceeds with the rest of the logic, and my action logs a blank for the action in the comments section.

Pseudo code:

Switch(
DR_StatusDataCardValue.Selected.Value,
"Status 1",
UpdateContext({approverAction: "User Created Item"}),
"Status 2",
UpdateContext({approverAction: "Department Accepts Item"}),
"Status 3",

UpdateContext({approverAction: "Respondent Completes Request"}),

UpdateContext({approverAction: "Submits"})

);

 

If I create an item then complete the next step the approverAction is behind (i.e. In the Comments field of the list item approverAction logs nothing on creation. Then when I complete the next step comments logs User Created Item when it should log Department Accepts Item).

A work-around I have implemented is putting UpdateContext({approverAction: Blank()}); before the switch. This seems to work, but disproves the notion that the app seems to be ignoring the first action.

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, the above code works fine, i have tested it, i would say the issue is in the next action of the submit

  • jhicks Profile Picture
    41 on at

    That's the thing. The above code worked for many months. Then, with no changes to the app, it stopped working. I wasn't sure if there was some new update/patch that might interrupt how PowerApps works with some services such as SharePoint.

  • C-Papa Profile Picture
    1,836 on at

    the code supplied just performs the switch, it doesn't do anything after, its missing the next action. 

  • timl Profile Picture
    36,725 Super User 2026 Season 1 on at

    Hi @jhicks 

    At the end of your submit button, do you navigate the user to different screen, or does the user stay on the same screen? If it's the latter, I would add a label and set the text property to approverAction.

     

    That would enable you to inspect the value of approverAction after the user clicks submit, and to allow you to verify whether Power Apps has executed the switch logic and set the variable.

  • jhicks Profile Picture
    41 on at

    Correct. It was just a code snippet. The app does everything else in the buttons logic just fine. It just acts like the first line gets ignored. It actually acts like it updates the variable after the submit since the next action is an action behind what the current action should be.

  • jhicks Profile Picture
    41 on at

    Unfortunately it brings them back to a "worklist" screen. I added a label anyway but as I mentioned in my response to C-Papa above the variable is a step behind. So when a user opens the app and performs a step the action doesn't get logged, but if they stay in the app and perform another step an action is logged, but it's the previous step. So it acts like first time around that line in the code does nothing but still updates the variable after the submit (which makes no sense), and thus any action logged thereafter is just behind.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard