cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sasrsc
Responsive Resident
Responsive Resident

Combobox in a Form default to the User

I have a Form with a Combobox.

Presently the default value of the card is ...

ThisItem.Requestor

I want to improve the UX and make it default to the user if the Form is in New Mode...
I am doing this...in the default property of the card itself (not the combo box). what am I doing wrong as it says...
the function if has invalid arguments.

If(FrmTicketRequest.Mode=FormMode.New,Table({ 
    Claims:"i:0#.f|membership|" & Lower(User().Email), 
    Department:"", 
    DisplayName:User().FullName, 
    Mail:User().Email, 
    JobTitle:".", 
    Picture:"."
}
),ThisItem.Requestor)

 

1 ACCEPTED SOLUTION

Accepted Solutions

The user column must be single person and only expects a record.  If it were multi-people a table should work.

 

A shorter version of the default record, with Lower(), seems to work well for me, below.  I'm curious if providing more info helps or hurts or if it matters not....?

 

{ 
Claims:"i:0#.f|membership|" & Lower(User().Email), 
DisplayName:"", 
Email:"" 
} 

 

View solution in original post

3 REPLIES 3
sasrsc
Responsive Resident
Responsive Resident

Well, the answer was...to set the card default value to....

If(FrmTicketRequest.Mode=FormMode.New,
    { 
      DisplayName:User().FullName,
      Claims:"i:0#.f|membership|" & Lower(User().Email), 
      Department:"", 
      Email:User().Email, 
      JobTitle:"", 
      Picture:""
    },
    ThisItem.Requestor
)

I was trying to add a table previously.
Can someone explain why it's not a table and simply an object in "lay person" terms please.


The user column must be single person and only expects a record.  If it were multi-people a table should work.

 

A shorter version of the default record, with Lower(), seems to work well for me, below.  I'm curious if providing more info helps or hurts or if it matters not....?

 

{ 
Claims:"i:0#.f|membership|" & Lower(User().Email), 
DisplayName:"", 
Email:"" 
} 

 

sasrsc
Responsive Resident
Responsive Resident

thanks for the explanation.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,847)