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 / Trying to change datac...
Power Apps
Unanswered

Trying to change datacard's Y position with IF condition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, 

 

My situation:

  • I have a datacard Responsible_manager_Datacard1 with a dropdown connected to a specific SharePoint group (Items = Choices([@Testing].Responsible_manager);
  • Its position is X = 0; Y = 14.

I tried setting Y = If(User().FullName = ResponsibleManager.Selected.DisplayName,0,14), so that every time a ResponsibleManager would connect to the Power App, the Responsible_manager datacard would move to the top. However, my function does not work..

 

Perhaps someone could advice what would be the problem or even if it possible to change datacard's position based User().FullName. Any advice is very appreciated!

Categories:
  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    I would advise against UX patterns that move cards in this way for accessibility reasons. 

     

    Can you share more about what you want the user to achieve? There are design patterns that the community can suggest here.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Mr-Dang-MSFT , 

     

    Thank you for your reply. Appreciate it!


    User Scenario:
    - An administrator fills in the Power App with required information and shares the link with a manager;

    - Manager reviews information, but can edit only 3 fields in the whole form. 

    The desired scenario is that the fields, edited by the manager, would appear in the top of the form (added a rough sketch below). Therefore, I have experimented with the Y function which could change data card's position If(User().FullName = Manager...

     

    powerappform0721.pngpowerappform0721.png

  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    Some questions:

    • Does the manager need to see the rest of the fields at the same time as the 3 fields they need to change?
    • How many fields can be seen at the same time as the 3 fields to be changed?

    If the manager would only change 3 fields, I would create a new form on a new screen with only those 3 things. Surface the least amount of things to make a decision.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for the suggestion. Noted. Answered to your questions.

    Some questions:

    • Does the manager need to see the rest of the fields at the same time as the 3 fields they need to change?
      • Yes. It is important to keep all data cards visible for the manager. 
    • How many fields can be seen at the same time as the 3 fields to be changed?
      • Ideally all. The manager should be able to see the information while editing the fields.
        • For example, one of the 3 fields would be Comments.  So it would be beneficial if the manager is able to see information in other fields while filling in the Comments section.
  • Mr-Dang-MSFT Profile Picture
    Microsoft Employee on at

    Looking at it another way: 

    Do the fields the manager edits need to be in the order that shows up for when the administrator fills out the form?

     

    If you keep the fields for the manager at the top for the administrator as well, since they seem to be important anyway, would that be logical for the admin?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you. Well, the ideal scenario would be that the manager gets fields ordered a bit differently. Administrator should see the fields in a different order than the manager.

     

    As showed in this quick sketch, when the manager logs in, those specific editable fields should be put to the top.

     

     powerappform0721.png

  • DS1060 Profile Picture
    86 on at

    I managed to do this by turning off the form properties "Snap to columns".

    I figured that putting this off, the datacards are not being reindexed when you move another DataCard in the form.

    Else, everytime you move a DataCard, all other datacard below it get a new Y position.

     

    So I leave a significant number inbetween my datacards rows.

    And then you can put a "If" in the Y properties of the datacard to move depending on conditions.

     

    For example, lets say We want Q3 to be on top when Q1 is true.

    Q1_DataCard.Y = 100

    Q2_DataCard.Y = 200

    Q3_DataCard.Y = If(Q1_Value.Value,50,300)

    Q4_DataCard.Y = 400

     

    You probably already used a workaround since 2020 but for others who might look for same use.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard