Friday, September 23, 2022

Create Filter Expression with AND & OR Condition in Model Driven Apps

Introduction:


In this Blog we Will see how to Use Filter Expression with Both And/Or Condition with Query Expression


Implementation Steps:

 

Consider a Scenario that I want to make Multiple Filter Condition with Both And/or Condition From Account Table Using Plugins

 

QueryExpression query = new QueryExpression("account");
query.ColumnSet.AddColumns("accountid");
FilterExpression filterAccount = new FilterExpression(LogicalOperator.Or);

FilterExpression filterName = new FilterExpression(LogicalOperator.And);
filterName.Conditions.Add(new ConditionExpression("NAME_LOGICALNAME", ConditionOperator.Equal, PASSYOURVALUEHERE));
filterName.Conditions.Add(new ConditionExpression("NAME_LOGICALNAME", ConditionOperator.Equal, PASSYOURVALUEHERE));

FilterExpression filterName2 = new FilterExpression(LogicalOperator.And);
filterName2.Conditions.Add(new ConditionExpression("NEWFIELD_LogicalName", ConditionOperator.Equal, id2));
filterName2.Conditions.Add(new ConditionExpression("NEWFIELD_LogicalName", ConditionOperator.Equal, id3));

filterAccount.AddFilter(filterName);
filterAccount.AddFilter(filterName2);

query.Criteria = filterAccount;

 

In the Above Example Am using Both And/OR Condition in FilterExpression with QueryExpression.

 

That's it :slightly_smiling_face:

Wednesday, September 14, 2022

How to use Terminate Operation in Microsoft Flows

Introduction:


In this Blog we will see how to use Terminate Operation in Microsoft flows


Implementation Steps:

 

1. Navigate to https://make.powreautomate.com

 

2. Click My Flows --> Select New Flows and Select Instant Cloud Flows

 

3. Then it will show a popup input the name and Select PowerApps

rampprakash_0-1663134722682.png

 

4. In My demo am using Back End as SharePoint List.

 

5. If the SharePoint List Does not Contain Data Terminate the flow else process the flow

 

6. For that First use Get List and Get the Items from the List

 

rampprakash_1-1663135209771.png

 

 

7. Add a Condition and Check the Length of the List

 

rampprakash_2-1663135243521.png

 

 

8. If the Length is 0 then Terminate the flow (Click Add Step and Search for Terminate)

 

rampprakash_3-1663135303922.png

 

9. Once Added you can provide Your Own Status Code and Message 

 

rampprakash_4-1663135335271.png

 

 

That's it :slightly_smiling_face:

 

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...