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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,032)