Give us feedback
string-dictionary
Web icon

String Dictionary

Stable version 1.0.0 (Compatible with OutSystems 11)
Also available for 10
Uploaded on 27 November 2016 by 
0.0
 (0 ratings)
string-dictionary

String Dictionary

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.

Release notes (1.0.0)
Reviews (0)
Team