Skip to main content

Notifications

Community site session details

Community site session details

Session Id : t5i164oIOVA9S3aYuVl0cw
Power Apps - Building Power Apps
Answered

Mistake with my Edit Form after a sort by columns in my gallery

Like (0) ShareShare
ReportReport
Posted on 12 Apr 2024 09:54:08 by 22

Hi,

 

I tried to sort my galery with this code 

 

 

SortByColumns(AddColumns(

    Search(

    Filter(

     'Actions - CP3';

        Etat.Value = Dropdown3_2.Selected.Value || Dropdown3_2.Selected.Value = Blank();

        Priorité.Value = Dropdown3_3.Selected.Value || Dropdown3_3.Selected.Value = Blank();

        'Affecté à'.DisplayName = ComboBox3_1.Selected.DisplayName || ComboBox3_1.Selected.DisplayName = Blank();

        Action.Value = Dropdown3_4.Selected.Value || Dropdown3_4.Selected.Value = Blank());

            TextSearchBox1_3.Text;"Title");

            "_Action";Action.Value);"_Action";

                     

           If(SortDescending1; SortOrder.Descending; SortOrder.Ascending)

           )

 

 

But now when i go in my edit screen i have a mistake and i don't know why ?

 

Could you help me ?

 

I make my app in the message

 

Thank you very much

 

Thomas

Categories:
  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 12:12:13
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    Yes !! 😁

  • WarrenBelz Profile Picture
    146,947 Most Valuable Professional on 15 Apr 2024 at 12:10:45
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    @LacroixThomas ,

    So this is now solved ?

  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 12:04:09
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    Thank you.... I deleted the card and it's work...

  • Verified answer
    WarrenBelz Profile Picture
    146,947 Most Valuable Professional on 15 Apr 2024 at 11:35:47
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    @LacroixThomas ,

    Unfortunately, all of that should work and both update the field in the list and display the current selection. It appears to display the current value (I assume this is a single selection combo box) from your screen shot, so why it does not Update with DataCardValue12.Selected is a complete mystery. You can try

    {Value: DataCardValue12.Selected.Value}

    but it is the same thing.
    I am assuming here that Action is a Choice field in your SharePoint list  and that DataCardValue12 is a Single Choice control.
    Final thought here - you may have corrupted this when you changed your Items - delete the card and re-create it and see if it works then.

     

  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 11:24:31
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    LacroixThomas_2-1713180230826.png


    LacroixThomas_3-1713180258878.png

     

     

  • WarrenBelz Profile Picture
    146,947 Most Valuable Professional on 15 Apr 2024 at 11:12:36
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    @LacroixThomas ,

    Which is why the question I asked in the last post was What is the Items of DataCardValue12 ?

  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 09:54:53
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    Everything works fine except when I validate the form, the "Action" field of datacardvalue12 does not record the choice I selected. It always leaves this field empty...

    LacroixThomas_0-1713174885980.png

     

  • WarrenBelz Profile Picture
    146,947 Most Valuable Professional on 15 Apr 2024 at 09:42:40
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    @LacroixThomas ,

    it doesn't work does not really help me to solve this for you. I will go back to basics here so that I have a proper understanding of what you have. Your Gallery Items is

    SortByColumns(
     AddColumns(
     Search(
     Filter(
     'Actions - CP3';
     Etat.Value = Dropdown3_2.Selected.Value || Dropdown3_2.Selected.Value = Blank();
     Priorité.Value = Dropdown3_3.Selected.Value || Dropdown3_3.Selected.Value = Blank();
     'Affecté à'.DisplayName = ComboBox3_1.Selected.DisplayName || ComboBox3_1.Selected.DisplayName = Blank();
     Action.Value = Dropdown3_4.Selected.Value || Dropdown3_4.Selected.Value = Blank()
     );
     TextSearchBox1_3.Text;
     "Title"
     );
     "_Action";
     Action.Value
     );
     "_Action";
     If(
     SortDescending1; 
     SortOrder.Descending; 
     SortOrder.Ascending
     )
    )

    OnSelect of the Gallery

    Set(
     gblRecord;
     ThisItem
    )

    Item of your Form

    LookUp(
     'Actions - CP3';
     ID = gblRecord.ID
    )

    OnSuccess of your Form

    Set(
     gblRecord;
     Self.LastSubmit
    )

    What is the Items of DataCardValue12 ?

     

  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 09:13:34
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    it doesn't work 😪

  • LacroixThomas Profile Picture
    22 on 15 Apr 2024 at 08:53:35
    Re: Mistake with my Edit Form after a sort by columns in my gallery

    Ok but i think i make the different code that you give in the wrong place...

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 58

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 42 Super User 2025 Season 1

Overall leaderboard