Skip to main content
March 23, 2023
Question

How to remove items from list of dictionary?

  • March 23, 2023
  • 10 replies
  • 0 views

List of Dictionary - 3 items
Dictionary
  icon:"arrow-circle-o-left"(Text)
  action:26(Number (Integer))
Dictionary
  icon:"sitemap"(Text)
  action:25(Number (Integer))
Dictionary
  icon:"check-circle-o"(Text)
  action:28(Number (Integer))

As i want to remove second item from dictionary what should i do 

10 replies

santiagor1617
March 24, 2023

Hi Klaus34, you can use the function remove() and select the index that you want to delete, example, remove(local!array,2) 

ayusha3676
March 24, 2023

a!localVariables(
  local!map: {
    { icon: "arrow-circle-o-left", action: 26 },
    { icon: "sitemap", action: 25 },
    { icon: "acheck-circle-o", action: 28 }
  },
  remove(  local!map,2)
)

sivakrishnam0002
December 10, 2023

[mention:c4f93897cfed4b188e78b2223ce098f3:e9ed411860ed4f2ba0265705b8793d05]  As i want to remove all items from dictionary. Can you please help me

stefanhelzle0001
Brainy
December 10, 2023

When you remove all items from a list, you end up with an empty one. I am not sure what you are looking for. Can you explain your specific scenario?

Keep in mind that variables in Appian expressions are immutable. Once declared, you cannot modify them. In an interface, this is different, you can update variables as a result of user interactions.