LINQ and Lambda Expressions - Designer - Foundation 24.1 - Foundation 24.1 - Ready - Hyland RPA - external - Hyland-RPA/Designer/Foundation-24.1/Hyland-RPA-Designer/Visual-Basic-Text-Expressions/LINQ-and-Lambda-Expressions - 2025-04-03

Hyland RPA Designer

Platform
Hyland RPA
Product
Designer
Release
Foundation 24.1
License

This topic provides code samples for LINQ and Lambda expressions.

  • Gets the first list item that matches "Meyer"

    myString = myList.Find(Function(x) x.Equals("Meyer")) 
    
  • Gets the first list item that contains "Meyer" or "Mayer"

    myString = myList.Find(Function(x) x.Contains("Meyer") OR x.Contains("Mayer")) 
    
  • Gets a sorted list ordered by the first column in ascending order, then by the second column.

    mySortedList = myUnsortedList.OrderBy(Function(x) x(0).ThenBy(Function(x) x(1)).ToList() 
  • Gets a sorted dictionary, ordered from highest to lowest value.

    mySortedDictionary = myDictionary.OrderByDescending(Function(x) x.value).ToDictionary(Function(x) x.Key, Function(x) x.Value)