cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Helper V
Helper V

Toggle adding to variable

Hi,

 

When a Privileged user now selects the toggle, a pop up appears with a combobox. When they enter a person into this combobox and hit Submit, it adds the Display Name of the person from the combobox to a variable called "LondonDelPerson". 

 

On my patch command (this is a deskbooking app), a column name is 'LDN Desk Reserved For:'   - I want this to patch the LondonDelPerson's name if the variable is not blank, otherwise patch the user's name (User().FullName).

 

Any ideas?

 

I was trying Text(If(!IsBlank, LondonDelPerson, User().FullName)   but get an error?

 

Thanks

K

1 ACCEPTED SOLUTION

Accepted Solutions
Ramole
Resident Rockstar
Resident Rockstar

@Kosenurm 

 

I see you're using  

IsEmpty

Use Isblank()

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Ramole
Resident Rockstar
Resident Rockstar

Hi @Kosenurm 

 

Just use 

If(IsBlank(LondonDelPerson),Patch .....
Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

@Ramole 

 

Thanks for your reply.

 

I already have an If for the Patch....   the variable CanBook is to ensure that the user can only make one desk booking per selected day...

 

Set(canBook,IsEmpty(Filter(LDN_Desk_Reservations,'LDN Desk Reservation Date'= LDN_Date_Picker.SelectedDate && 'LDN Desk Reserved For'=User().FullName)));
If(canBook,
Patch(
LDN_Desk_Reservations,
Defaults(LDN_Desk_Reservations),
{'Desk Reference': Buttontext},
{'LDN Desk Reserved For': User().FullName},
{'LDN Desk Reservation Date': LDN_Date_Picker.SelectedDate},
{'LDN Desk Availability Status': "Reserved"},
{Location: "London"},
{'LDN Desk Booked Date': Today()},
{'LDN Desk Booked By':User().Email},
{'Travel Method': Text(ddSelectTravel.Selected.Value)},

 

The "LDN Desk Reserved For" needs the variable of the person grabbed via LondonDelPerson variable if NOT blank, else patch the User().FullName...

 

Thanks

K.

Ramole
Resident Rockstar
Resident Rockstar

@Kosenurm 

 

I see you're using  

IsEmpty

Use Isblank()

Thank you
If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,327)