Fonctions communes:API - RESULT - WIDGET : Différence entre versions
(→Informations retournées) |
(→Informations retournées) |
||
| Ligne 20 : | Ligne 20 : | ||
"FieldName":"Label", | "FieldName":"Label", | ||
"TypeID":"2", | "TypeID":"2", | ||
| − | "SubTypeID":"" | + | "SubTypeID":"", |
| + | "DisplayLabel":"Libellé", | ||
| + | "DisplayFormat":"" | ||
}, | }, | ||
{ | { | ||
"FieldName":"Value", | "FieldName":"Value", | ||
"TypeID":"1", | "TypeID":"1", | ||
| − | "SubTypeID":"1" | + | "SubTypeID":"1", |
| + | "DisplayLabel":"Qté", | ||
| + | "DisplayFormat":"FQ" | ||
}, | }, | ||
{ | { | ||
"FieldName":"Color", | "FieldName":"Color", | ||
"TypeID":"2", | "TypeID":"2", | ||
| − | "SubTypeID":"" | + | "SubTypeID":"", |
| + | "DisplayLabel":"Couleur", | ||
| + | "DisplayFormat":"" | ||
} | } | ||
], | ], | ||
Version du 18 mars 2020 à 14:34
| API - RESULT - WIDGET |
Informations envoyées
Retourne les informations nécessaire à l'affichage du widget.
DemAction : RESULT
DemCat : WIDGET
DemOptions :
- NomSession : Même nom de session utilisé lors de l'envoi d'une requête sous forme de JSON.
- WidgetCode : Code du widget. Récupérer à partir de LIST / WIDGET.
- Params : XML listant les valeurs pour les différents paramètres. Le XML devra être formaté comme ceci :
<Param Name="OcaUID" Value="18" /> <Param Name="MinDate" Value="2017-01-01" /> <Param Name="MaxDate" Value="2017-12-31" />
Informations retournées
Les informations retournées changeront d'un widget à l'autre. Voici un exemple pour le widget SOMTAC :
{
"Column":[
{
"FieldName":"Label",
"TypeID":"2",
"SubTypeID":"",
"DisplayLabel":"Libellé",
"DisplayFormat":""
},
{
"FieldName":"Value",
"TypeID":"1",
"SubTypeID":"1",
"DisplayLabel":"Qté",
"DisplayFormat":"FQ"
},
{
"FieldName":"Color",
"TypeID":"2",
"SubTypeID":"",
"DisplayLabel":"Couleur",
"DisplayFormat":""
}
],
"Data":[
{
"Label":"En retard",
"Value":"0",
"Color":"FF0000"
},
{
"Label":"Dans les délais",
"Value":"0",
"Color":"FFFF00"
},
{
"Label":"En avance",
"Value":"0",
"Color":"00FF00"
}
],
Footer:[
{
"RecordCount":"1"
}
]
}
Column : Donne les informations sur les colonnes retournées par la paire Data.
- FieldName : Nom de la paire
- TypeID : Numéro indiquant si la valeur est du texte, un nombre, une date, etc. (voir CONFIG / WIDGET)
- SubTypeID : Apporte une précision sur l'affichage pour les nombres et les dates. (voir CONFIG / WIDGET)
Data : Informations propres au widget
- Label : Statut de la tâche
- Value : Nombre de tâches avec ce statut
- Color : Couleur pour le graphique
Nom du document : Fonctions communes:API - RESULT - WIDGET