From wiki.ginstr.com
Jump to: navigation, search
(code)
m (formatting)
 
Line 17: Line 17:
 
===Query BLE fingerprint===
 
===Query BLE fingerprint===
  
;<code>[gn:act_queryBLEFingerprint]|[table,query;column;target]</code>
+
:;<code>[gn:act_queryBLEFingerprint]|[table,query;column;target]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| table
+
| <code>table</code>
 
| table name which will be queried
 
| table name which will be queried
 
|-
 
|-
| query
+
| <code>query</code>
 
| query name which will be used for query
 
| query name which will be used for query
 
|-
 
|-
| column
+
| <code>column</code>
 
| column name which will be used for value retrieval
 
| column name which will be used for value retrieval
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the value will be stored
 
| [[target]] where the value will be stored
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
Line 41: Line 41:
  
 
====Example====
 
====Example====
 +
:<code>securityBagLocations</code> - table name<br>
 +
:<code>securityBagLocationsQuery</code> - query name<br>
 +
:<code>securityBagLocation_locationName</code> - column name<br>
 +
:<code>@+id/LocationName</code> - target<br>
 +
:; ⤷ <code>[gn:act_queryBLEFingerprint]|[securityBagLocations, securityBagLocationsQuery;securityBagLocation_locationName;@+id/LocationName]</code>
 +
 
=====queries.xml=====
 
=====queries.xml=====
 
<syntaxhighlight code="xml">
 
<syntaxhighlight code="xml">
Line 55: Line 61:
 
     securityBagLocation_createdBy" />
 
     securityBagLocation_createdBy" />
 
</syntaxhighlight>
 
</syntaxhighlight>
=====code=====
+
 
<code>securityBagLocations</code> - table name<br>
 
<code>securityBagLocationsQuery</code> - query name<br>
 
<code>securityBagLocation_locationName</code> - column name<br>
 
<code>@+id/LocationName</code> - target<br><br>
 
<code>[gn:act_queryBLEFingerprint]|[securityBagLocations,securityBagLocationsQuery;securityBagLocation_locationName;@+id/LocationName]</code>
 
 
<hr>
 
<hr>

Latest revision as of 19:44, 12 July 2017

gn:act_queryBLEFingerprint

Description
Action used to return all data for specific user from table which contains BLE fingerprint values.
After the data is retrieved, this action will then compare current BLE fingerprint with all records and return value from row with the closest BLE fingerprint and sets the defined field value into target widget.
This query returns only one row with closest BLE fingerprint.
Action returns
boolean
Limitations
Can only be used in gn:act_setOnBLE event.

Action signatures

Query BLE fingerprint

[gn:act_queryBLEFingerprint]|[table,query;column;target]
Parameter Description
table table name which will be queried
query query name which will be used for query
column column name which will be used for value retrieval
target target where the value will be stored

Example

securityBagLocations - table name
securityBagLocationsQuery - query name
securityBagLocation_locationName - column name
@+id/LocationName - target
[gn:act_queryBLEFingerprint]|[securityBagLocations, securityBagLocationsQuery;securityBagLocation_locationName;@+id/LocationName]
queries.xml
<query 
  id="securityBagLocationsQuery"
  columns="securityBagLocation_locationName,
    securityBagLocation_locationNFC,
    securityBagLocation_geofence,
    securityBagLocation_geofenceRadius,
    securityBagLocation_bluetoothMAC,
    securityBagLocation_WiFiMACIP,
    securityBagLocation_cellInfo,
    securityBagLocation_createdOn,
    securityBagLocation_createdBy" />