xpfGetAttrsHashedValue
xpfGetAttrsHashedValue (hashTableIndex, index : INTEGER; attr1Value, attr2Value, attr3Value : STRING; attr4Value, attr5Value, attr6Value : STRING; attr7Value, attr8Value, attr9Value : STRING; attr10Value : STRING) instanceId : GENERIC;
The xpfMakeAttrsHashTable function establishes a hash table for instances of one specific entity type. Such a hash table is made with a certain number of keys (max is 10). The function has a variable length argument list. xpfGetAttrsHashedValues looks up in a hash table made by xpfMakeAttrsHashTable, supplying the same number of keys (attribute values) that the hash table was made for. The function has a variable length argument list.
Arguments
1 | Type | Name | Comment |
2 | GENERIC | hashTableIndex | the hash table index (returned from the xpfMakeAttrsHashTable function. |
3 | GENERIC | index | Generally one set of keys can result in more that one hit. Let index start with 1 and increment until the function returns  XPNULLID in order to handle all of the instances that constitute the match. |
4 | BOOLEAN | attr(n)Value | The key (attribute) values |
Return Value
Â
Type | Name | Comment |
INTEGER | instanceId | The returned instance identifier (that corresponds to the index) |
Options
Â
Example
LOCAL entityId : GENERIC; product_hash_index : INTEGER; index : INTEGER; s_product : GENERIC; END_LOCAL; entityId := xpfGetEntity(XPXSOURCEMODELID, 'PRODUCT'); product_hash_index := xpfMakeAttrsHashTable(XPXSOURCEMODELID, entityId, FALSE, 'PRODUCT_ID'); index := 1; REPEAT WHILE(TRUE); s_product := xpfGetAttrsHashedValue(product_hash_index,index,'PROD-ID-1'); IF(s_product :=: XPXNULLID) THEN ESCAPE; END_IF; (* .... handle the found instance here *) index += 1; END_REPEAT;
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â