I have a table with several columns which I need to be sorted. I'm using RestHeart Api and this is what I am feeding the column with:
{
"type": "text",
"size": "sm",
"id": "labelEstado",
"pathToValue": "estados___[key=='status']",
"text": "estado",
"icon": {
"cancelled": "glyphicon glyphicon-ban-circle fx-status-success",
"ok": "glyphicon glyphicon-ok fx-status-success",
},
"filter": true,
"sort": true
}
Something seems to be confusing the sorting process as the request is always passing the id in the GET request instead of "status" that is a "nested field" inside "estado"...
I tried
"sort": "status"
and
"sort": "estados.status"
but the GET request isn't filled properly (keeps ending in &sort_by=labelEstado) and no filter button over the column shows up.
How can I get the filter option to allow the filter button to show up but filter by "status" value?
Related
I have searched for information about how to create this field so that it only allows adding numbers and no other characters but no configuration works for the form to be built. I need the Json to create a dynamic form in Angular
"monto": {
"row": 3,
"type": "input",
"inputType": "integer",
"label": "Monto requerido (de $100 a $100.000)",
"required": true,
"validations": [
"required",
"min:100",
"max:100000"
]
}
I have an adaptive card in the form of a JSON file, which contains an Input.ChoiceSet. This is provided with a data payload, which is dynamic and so it is not the same amount of data every time. I want to be able to drop this Input.ChoiceSet if it breaks a certain threshold based on the length of the array of data that I'm going to pass to it. Is it possible to write this as an condition inside the Input.ChoiceSet using %when to carry this out?
This is currently what I have, but it is not working as I would've hoped:
{
"type": "Input.ChoiceSet",
"id": "CompactSelectVal1",
"$when": "${$data.length < 400}",
"placeholder": "Select a value",
"choices": [
{
"$data": "${data}",
"title": "${name}",
"value": "${tag}"
}
],
"label": "Input"
}
Using .length here was just a guess here, not based on any documentation. The documentation I have used to find out about $when is the following https://learn.microsoft.com/en-us/adaptive-cards/templating/language.
Any help on this would be much appreciated.
You can use "count" property instead of "length" and also remove the extra '$' inside the curly bracket "${$data.length < 400}".
Try this:
{
"type": "Input.ChoiceSet",
"id": "CompactSelectVal1",
"$when": "${count(data) < 400}",
"placeholder": "Select a value",
"choices": [
{
"$data": "${data}",
"title": "${name}",
"value": "${tag}"
}
],
"label": "Input"
}
If the condition is true then the choice button will hide from the adaptive card.
I am getting the below response from azure table storage. I need to search the response using the GeneralId and get the response true or false wheather an entity is available in table or not.
{
"odata.metadata": "https://google.net/$metadata#GetStudents",
"value": [
{
"odata.etag": "W/\"datetime'2019-05-01T18%3A04%3A37.5904256Z'\"",
"PartitionKey": "mypartitionkey",
"RowKey": "myrowkey",
"Timestamp": "",
"GeneralId": "456265d8-6c3b-11e9-a923-1681be663d3e",
"Inc": "PIR165461",
"Name": "",
"StudentId": "c17a3c42-6c48-11e9-a923-1681be663d3e",
"Subject": ""
},
{
"odata.etag": "W/\"datetime'2019-04-30T16%3A49%3A10.0746254Z'\"",
"PartitionKey": "par1",
"RowKey": "row1",
"Timestamp": "2019-04-30T16:49:10.0746254Z",
"Generald": "fada7dd0-6c48-11e9-a923-1681be663d3e",
"Inc": "PIR4237341",
"Name": "",
"StudentId": "c70c5de9-ac8d-4432-9f3c-1f8bede83504",
"Subject": ""
}
]
}
I guess you want to check if one entity exists in the table. So you could get the partition and row value from the json to check. Below is the workflow.
After Get Entities values, add a For each action, in the Input choose Dynamic content Get entities result List of Entities.
Then add Condition action to judge if the entity you want in the table. Use two condition, one is partition the other one is row vale.
After this you could add actions under If true or If false. And here is my test result.
I'm new to elasticsearch querying and probably this question is not so smart, but I would appreciate any help. Is there any idea how I can query only events in the following sample json user session (field "l"):
{
"dvs_t": 103492673,
"l": [
{
"e": "SessionInfo",
"p": {
"Device": "samsung GT-P6800",
"SessionNumber": "36"
},
"ts": 103279627
},
{
"e": "InAppPurchaseCompleted",
"p": {
"ItemID": "sdbundle_stars_10",
"TimePlayed_Total": "3 - 3.25 Hours"
},
"ts": 103318595
}
],
"osv": "4.1.2",
"request": "ANME",
"srv_ver": "0.2"
}
For instance, can I somehow
count the number of InAppPurchaseCompleted events in the session?
count the number of InAppPurchaseCompleted events in the sessions grouped by session parameter request or any other parameter?
Filter in Elasticsearch allow you to search (really quickly) on a specific set of data. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-filter.html.
If you only want to return count you can use search type count http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html#count
I have a json file simular to this:
[{
"name": "testReport",
"type": "Intern",
"description": "Test report for extjs",
"query": "select DATE(sa.startTime)",
"queryFields": [{
"name": "name",
"type": "STRING",
"format": null,
"many": false
}, {
"name": "from",
"type": "DATE",
"format": "yyyyMMdd",
"many": false
}, {
"name": "to",
"type": "DATE",
"format": "yyyyMMdd",
"many": false
}]
In a grid i show the name, type and description. When you click on a button i want to open a new window what is working. But what i need is to open the window and generate a form based on the queryFields. So when i click on the testreport i need to have a textfield(name), a datefield(from) and a datefield(to). Is this possible? And how do i do this :$
Use a SelectionModel (maybe a CheckBoxSelectionModel). The user will select the row they want by checking the check boxes of the rows. Then when they click the display reports button you can use the SelectionModel to find all the selected records and pass the records on to your form which which you can use to create the form or fill the forms fields in whichever you need.
My advice is to look at the API for
GridPanels
SelectionModels
Record
Then design it when you have an understanding of these concepts.