Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Map() function

Certified Senior Developer

What is map function what it does and how we use it.

I see in some interfaces it has been used in ruleinputs as a datatype.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Basically the same thing as a dictionary, but with many other uses.  It's an ad hoc CDT-like thing that you define by filling it with whatever.  The cool thing is, unlike dictionary, you can pass it to a process model as a process variable and do lots of other things with it.  It's really cool for determining the structure the data will go into at runtime, but it does have some limits.

  • 0
    Certified Lead Developer
    in reply to davel001150

    In addition to being able to pass it to a process as a PV (which does open up some nice new doors, as it were), the biggest strength of a!map() over a traditional dictionary, is that the data items within the map will keep their data type very well.  In a dictionary it was often hard to use certain primitive operators (like "local!dict.number = 1") because data elements in a dictionary would resolve as a sort of "any type" data type, which did not play well with direct comparisons like the above.

Reply
  • 0
    Certified Lead Developer
    in reply to davel001150

    In addition to being able to pass it to a process as a PV (which does open up some nice new doors, as it were), the biggest strength of a!map() over a traditional dictionary, is that the data items within the map will keep their data type very well.  In a dictionary it was often hard to use certain primitive operators (like "local!dict.number = 1") because data elements in a dictionary would resolve as a sort of "any type" data type, which did not play well with direct comparisons like the above.

Children
No Data