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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / invalid argument type ...
Power Apps
Unanswered

invalid argument type in combobox

(1) ShareShare
ReportReport
Posted on by 6
Hi all, i have a lookup column in a list and in a form is populated with defaultselecteditems, but i have a error in DisplayFields on combobox. This issue does not impact the application and I only want to eliminate this errorr that the app shows.
 

What am I missing?

Thanks, Matias
Categories:
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    Firstly, can you please post code in Text - saves re-tying here. If you simply want the first choice as the DefaultSelectedItems when the newMode applies
    If(
       newMode;
       First(
          Sort(
             Choices([@Pyme_Weekly].Weekly);
             Id;
             SortOrder.Descendlng
          )
       );
       Parent.Default
    )
    Both are Tables of the correct structure, so there is no need to specify the contents.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • CU21082029-0 Profile Picture
    6 on at
    This is the code:
     
    If( 
       newMode = true;
       { '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
          Id:First(Sort(Choices([@Pyme_Weekly].Weekly).Id;Id;SortOrder.Descending)).Id;
          Value:First(Sort(Choices([@Pyme_Weekly].Weekly);Id;SortOrder.Descending)).Value 
       };
       Parent.Default
    )
     
  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    You could also do this
    With(
       {
          _Data:
          First(
             Sort(
                Choices([@Pyme_Weekly].Weekly);
                Id;
                SortOrder.Descending
             )
          )
       },
       If( 
          newMode;
          { 
             Id: _Data.Id;
             Value: _Data.Value
          };
          Parent.Default
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard