String Dictionary

Stable Version 1.0.0 (OutSystems 10)
Published on 27 November 2016 by 
Created on 27 November 2016
Details
This .Net only extension implements a dictionary whose values are persisted in a Text attribute.
Read More

This .Net only extension implements a List<KeyValuePair<string,string>> but operates more like a dictionary, because the keys have to be unique.  The value of the dictionary is maintained in a text field, and each action takes in the text field, processes your action, and returns a revised text field.

It uses delimiters to split up the text field.  For example:


1~10@False|8~0@False|11~0@False|2~15@False|5~0@False|3~0@False

| splits up entries
Within an entry, ~ splits the key from the value
Within a value, @ splits individual values

Implements 21 functions and actions:

DictionaryNew - Creates a string that represents a new dictionary.  (Or "" works too.)  Exists for future compatibility for revisions to the implementation.

DictionaryAdd - Adds a key to the dictionary.  If the key already exists, the value is updated.

DictionaryCount - Counts the number of entries in the dictionary

DictionaryFindByValue - Finds the index of the first entry matching the value.  -1 if not found.

DictionaryFindKey - Finds the index of the first entry matching the key.  -1 if not found.

DictionaryGetByIndex - Gets the value at the given index or "" if index isn't in the dictionary.

DictionaryGetByKey - Gets the value for the given key or "" if key isn't in the dictionary.

DictionaryRemoveByIndex - Removes the entry for the dictionary index found at the INDEX.  DictionaryIn = DictionaryOut if Index is outside isn't inside the dictionary.

DictionaryRemoveByKey - Removes a entry from the dictionary.  DictionaryIn = DictionaryOut if Key is not found.

DictionaryReplaceByIndex - Replaces an entry in the dictionary by it's index.  If the index < 0 or greater than the length, DictionaryIn = DictionayOut

DictionaryReplaceByKey - Replaces the value for the dictionary index found at the INDEX.  DictionaryIn = DictionaryOut if key is not found.

DictionarySortByKey - Sorts the dictionary according to the key


DictionarySortByValue - Sorts the dictionary according to the value

DictionaryMakeValue# - Assembles # (2-5) parts into a dictionary value using @ to separate them


DictionarySplitValue# - Splits a dictionary value into # (2-5) parts using @ as the delimiter.

Reviews (0)
Category
Components, Libraries
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Ian Johnstone who created this component.
Dependencies
String Dictionary has no dependencies.
Requirements
Platform:
10.0.0.402
Database:
All
Stack:
.NET
Component Consumers
No consumers yet.
Weekly Downloads