cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DawidK
Helper I
Helper I

IF and FOR ALL

Hello,

I have a combobox with DefaultSelectedItems :

If(
Service_Selected.Selected.Field1 <> "UNSUPPORTED_CALLS",
{Value:Service_Selected.Selected.Field1}, Defaults('Service List'.Field1)
)

i would like to incorporate that in my edit screen:

ForAll(SecondLineTracker_1,LookUp(SecondLineTracker_1, TicketNumber = Ticket_Number_1.Text,ServiceSelectedBy2ndLine))

 

I want to have the lookUp on the editscreen but if i must do a change  i want to make the DefaultSelected IF statement work. 

I see that ForAll is not a Selected.Field so that doesnt trigger the If statement.

 @RandyHayes u helped me today so i guess u can solve it also. I tried hard but sth is wrong.

1 REPLY 1
RandyHayes
Super User
Super User

@DawidK 

I'm not sure I am entirely following what you are trying to do.

Are you saying that you would like to have multiple items selected in your ComboBox based on the ForAll results?

 

First I'd say you need not use a ForAll for this, a simple Filter should do the trick.

    Filter(SecondLineTracker_1, TicketNumber = Ticket_Number_1.Text)

 

However, as I pointed out in the other thread - the Signature of the DefaultSelectedItems and the Items MUST match in order for selecting items to work properly.  So, your Items property for this ComboBox must be based on SecondLineTracker_1 in order to get it to select properly.

 

I hope that helps you out.

 

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,882)