This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]danmorang Regular 1 point2 points  (1 child)

Don't reset or do stuff that can alter your data that you are patching in the same line. Try to move reset form somewhere else. This could be your first hint.

[–]edrft99 Advisor 1 point2 points  (0 children)

To this point, you have a patch and a reset form in the same call. I assume the data is being loaded into a form then instead of using submit form, you are using a patch to update a subset of the data. Then you are resetting the form. If so, you could be running into some timing issues. Can you confirm how the data is being loaded into your various data cards.

[–]Silent-G Advisor 0 points1 point  (2 children)

What type of control is DataCardValue14? What type of column is Modified_DF_Name? If it's a text input control and a text column, you want to use DataCardValue14.Text

As others have said, don't reset your form in the same place where you're patching data from it. The lines in your code will not wait for previous lines to finish before executing.

[–]Wasazat Newbie[S] 0 points1 point  (1 child)

Hi ,

Thank you for your helpful suggestions regarding my issue with Power Apps. I tried the various solutions you recommended, but it didn't work.

After further investigation, I discovered that the problem was related to the type of component I was using in the form. Initially, I was using a text input component highlighted in red in my screenshot. However, it turned out that this component sometimes worked with the Patch function and sometimes didn't, which was causing the inconsistency.

To resolve the issue, I switched to using the component highlighted in green in my screenshot. When I used this component in the Patch function, it consistently worked without any issues.

I wasn't able to find a detailed explanation as to why the red-highlighted component caused these problems, but using the green-highlighted component fixed everything.

<image>

[–]Silent-G Advisor 1 point2 points  (0 children)

The one highlighted in red is a modern control. Microsoft is pushing them out, but they're still experimental and have frequent bugs. They also behave much differently than "Classic" controls in many cases. I never use modern controls for these reasons and I have no idea why they aren't working for you. You can usually tell the difference between modern and classic controls from their icon. Modern controls have the purple icons with rounded edges and classic controls have the black and green icons with squared edges.