rex_firebase_itemmonitor

ConceptIt is used to monitor items added, item removed, or values changed in any item in the item table, to read changed items back to client.This plugin only could read item back, use rex_firebase_itembook or to write items.

Monitor all items in a tableSample capxCall "Action:Start" to start monitoring all items in a table, or call "Action:Stop" to stop monitoring.

Monitor queried items in a tableSample capxFollows these steps to monitor queried items in a table-

On item added"Condition:On item added" will be triggered while a item had been added into item table. Get itemID of current added item by "Expression:LastItemID", content of item by "Expression:LastItemContent" in JSON string, or add 2nd parameter for specific key, 3rd parameter for default value if this key is not existed.

Expression:LastItemContent - get item values in JSON stringExpression:LastItemContent( key ) - get the value with specific keyExpression:LastItemContent( key , default_value ) - get the value with specific key, return default_value if this key is not existed

Designer could use these information to create an instance. Remember to maintain a mapping table from itemID to UID of created instance for picking this instance later.

On item removed"Condition:On item removed" will be triggered while a item had been removed. Get itemID of removed item by "Expression:LastItemID", content of item by "Expression:LastItemContent".Designer could use these information to remove the instance.

On value changed_, On any value changed"Condition:On value changed", and "Condition:On any value changed" will be triggered while a value of item had been changed. Get triggered itemID by "Expression:LastItemID". Changed value by "Expression:PrevValue", "Expression:LastValue". Property name by "Expression:LastPropertyName".

On key added, On key removed"Condition:On key added", "Condition:On key removed" will be triggered while the property of an item had been added or removed.

Retrieve current itemsCall "Condition:For each itemID" to retrieve current items. Get itemID and content by "Expression:CurItemID" and "Expression:CurItemContent". The input parameters of "Expression:CurItemContent" is the same with "Expression:LastItemContent".

Expression:CurItemContent - get item values in JSON stringExpression:CurItemContent( key ) - get the value with specific keyExpression:CurItemContent( key , default_value ) - get the value with specific key, return default_value if this key is not existed

Call "Condition:For each key" to retrieve properties of a specific item. Get property and respond value by "Expression:CurKey", "Expression:CurValue".