Dear users,
I am trying to build a power app and I feel like I crash on a wall. The Use case is : I want to filter my source ('Master source' in this case a SharePoint list) by Project title and replacement project.
I want to fulfill also 4 scenarios,
- If both drop-downs are empty
- If dropdown1 is empty and dropdown2 has a value
- If dropdown2 is empty and dropdown 1 has a value
- If both dropdowns have value
And I want it also to filter some fields of my SharePoint list :
- Type= "Application"
- TargetDecision= "Migration"
- Madrid_DB2 = " Madrid and Evonik"
- Madrid_DB"= "Evonik Only"
My code is with blue underlined and looks like this:
Filter(
'Master Source';
If(
And(IsBlank(Dropdown1.SelectedText.Value);IsBlank(Dropdown2.SelectedText.Value));And(Type="Application"; TargetDecision.Value="Migration"; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));
If(
And(Not(IsBlank(Dropdown1.SelectedText.Value));Not(IsBlank(Dropdown2.SelectedText.Value)));And(Type="Application"; TargetDecision.Value="Migration";ReplacementTechnology.Value=Dropdown2.SelectedText.Value;ReplacementProject_PPM.Value=Dropdown1.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));
If(
And(Not(IsBlank(Dropdown1.SelectedText.Value)); (IsBlank(Dropdown2.SelectedText.Value)));And(Type="Application"; TargetDecision.Value="Migration";ReplacementProject_PPM.Value=Dropdown1.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));
And(Type="Application"; TargetDecision.Value="Migration";ReplacementTechnology.Value=Dropdown2.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"))
))))
I have attached a Pic just to visualize the app. If anyone can help me I would be grateful !!