How to generate an xliff file for CaptionML - dynamics-nav

I'm creating a simple extension using the AL Visual Studio Code extension and I would like to get an xliff file so that I can translate my CaptionML.
How do I get that file?
This is my app.json
{
"id": "ba7ba688-4dfe-4594-9870-2db44fec7321",
"name": "test",
"publisher": "Default publisher",
"brief": "",
"description": "",
"version": "1.0.0.0",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"capabilities": [],
"dependencies": [],
"screenshots": [],
"platform": "11.0.0.0",
"application": "11.0.0.0",
"idRange": {
"from": 50100,
"to": 50149
}
}
and this is my extension code:
pageextension 50100 CustomerListExt extends "Customer List"
{
layout {
addafter(Name) {
field(NameAgain;Name) {
CaptionML = ENU = 'Another name field';
}
}
}
}

You need to add the following property in your app.json:
"features": ["TranslationFile"]

Related

how can i listing component nestedly?

[
{
"id": 0.5256669517010202,
"color": false,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5901705709044824,
"color": false,
"selected": false,
"type": [
{
"id": 0.30332161644408817,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5423422175390649,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.959208393000617,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
}
],
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5933110602496239,
"color": false,
"selected": false,
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
}
]
I think you should use Map method
const data = [
{
"id": 0.5256669517010202,
"color": false,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5901705709044824,
"color": false,
"selected": false,
"type": [
{
"id": 0.30332161644408817,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5423422175390649,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.959208393000617,
"color": true,
"selected": false,
"name": "",
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
}
],
"label": "",
"fieldName": "",
"required": "",
"validation": ""
},
{
"id": 0.5933110602496239,
"color": false,
"selected": false,
"type": "",
"label": "",
"fieldName": "",
"required": "",
"validation": ""
}
]
data.map((item) => item.id)
Just Try!
You should declared attribute type as Array always!
data.map(Item => (
Item.type.map(Item => ())
))
the map method is suitable here. For example you have your all data within state or another variable, well you can map throw it:
<div>
{yourData?.length && yourData.map(item => {
return(
<span>{item.id}</span>
...
<div>{item.type.map(typeItem => {
return(
<span>{typeItem.id}</span>
...
)
})
)})}
</div>

Insert parameters into JSON Array in Logic Apps

I am creating a Logic app to gather members from one platform using an API call and posting them to another platform using POST method. At the end of the entire process, I get a JSON array with the data that I need. However, I need to add in a parameters into the array at the beginning. How would I go about doing so?
Currently, my array looks like this
[
{
"company": "",
"email": "",
"firstName": "",
"lastName": "",
"nickname": "",
"prefix": "",
"sourceId": "",
"title": "",
"workPhone": ""
},
{
"company": "",
"email": "",
"firstName": "",
"lastName": "",
"nickname": "",
"prefix": "",
"sourceId": "",
"title": "",
"workPhone": ""
}
]
I need for the body of my HTTP request to look like this:
**{"data":**
[
**"dataRecord":** {
"company": "",
"email": "",
"firstName": "",
"lastName": "",
"nickname": "",
"prefix": "",
"sourceId": "",
"title": "",
"workPhone": ""
},
{
"company": "",
"email": "",
"firstName": "",
"lastName": "",
"nickname": "",
"prefix": "",
"sourceId": "",
"title": "",
"workPhone": ""
}
}
My current flow looks like this:
Scheduled Trigger
List item
Authenticate platform (to)
Authentication platform(from)
Get Data
Compose data
Parse Json
Initialize Array Variable
For Each:
(1)Compose - Map Parsed JSON data to Destination Fields
(2)Append to array variable
compose expression: string(variables('variable'))
Compose string to Json: json(string(outputs('Compose_2')))
HTTP POST
Edit:
Adding screenshot of where I need the data to be in the output, along with what my app looks like
After receiving the json array try using Parse Json action of Data Operations Connector to get the parameters and then you can form a json using Compose Connector. Here is the screenshot of my logic app for your reference.
Here is the output:
Here is the schema in the compose connector
{
"data": [
{
"dataRecord": {
"company": "#{items('For_each')['company']}",
"email": "#{items('For_each')['email']}",
"firstName": "#{items('For_each')['firstName']}",
"lastName": "#{items('For_each')['lastName']}",
"nickname": "#{items('For_each')['nickname']}",
"prefix": "#{items('For_each')['prefix']}",
"sourceId": "#{items('For_each')['sourceId']}",
"title": "#{items('For_each')['title']}",
"workPhone": "#{items('For_each')['workPhone']}"
}
}
]
}
Below is the code view of my logic app
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Compose": {
"inputs": {
"data": [
{
"dataRecord": {
"company": "#{items('For_each')['company']}",
"email": "#{items('For_each')['email']}",
"firstName": "#{items('For_each')['firstName']}",
"lastName": "#{items('For_each')['lastName']}",
"nickname": "#{items('For_each')['nickname']}",
"prefix": "#{items('For_each')['prefix']}",
"sourceId": "#{items('For_each')['sourceId']}",
"title": "#{items('For_each')['title']}",
"workPhone": "#{items('For_each')['workPhone']}"
}
}
]
},
"runAfter": {},
"type": "Compose"
}
},
"foreach": "#body('Parse_JSON')",
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "Foreach"
},
"Parse_JSON": {
"inputs": {
"content": "#triggerBody()",
"schema": {
"items": {
"properties": {
"company": {
"type": "string"
},
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"nickname": {
"type": "string"
},
"prefix": {
"type": "string"
},
"sourceId": {
"type": "string"
},
"title": {
"type": "string"
},
"workPhone": {
"type": "string"
}
},
"required": [
"company",
"email",
"firstName",
"lastName",
"nickname",
"prefix",
"sourceId",
"title",
"workPhone"
],
"type": "object"
},
"type": "array"
}
},
"runAfter": {},
"type": "ParseJson"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}

$unwind multiple arrays present in the embedded documents and show each array as single document as output in mongoDB

Refer below code. In this, field scenario is a embedded document which has has arrays and I want to showcase each array as a single document in the output. Note that each array contains embedded document in it so it would be helpful to get the code which extracts fields from those too. I'm not using java to query. Would be using external BI application which would be integrated in. Think I should also mention that i'm using NoSQLBooster for MongoDB application to create these queries.
{
"_id": {
"$oid": ""
},
"organisationId": "",
"bcpId": "",
"bcpName": "",
"bcpDescription": "",
"biaEntity": {},
"version": "0.01",
"status": "PENDING",
"primaryBridgeNumber": "1",
"alternateBridgeNumber": "2",
"scenario": [{
"_id": {
"$oid": "5e3ab709367d2c5f5826c6fd"
},
"scenario": "",
"strategies": [{
"mdmStrategy": {},
"strategy": {
"pSIStrategyDetails": {
"scenarioName": "",
"strategyName": "",
"rto": "",
"sustainablePeriod": {
},
"description": "1",
"primaryContact": {
},
"secondaryContact": {
},
"recoverySite": {
}
},
"pSICriticalStaff": {},
"specialRequirement": [{
}, {
}, {
}, {
}, {
}]
},
"createdOn": {},
"updatedOn": {}
}, {
"mdmStrategy": {},
"strategy": {
"pSIStrategyDetails": {},
"pSICriticalStaff": {},
"specialRequirement": [{
},
{
},
{
},
{
},
{
}]
},
"createdOn": {},
"updatedOn": }
}],
"description": "",
"status": "Active",
"createdOn": {},
"updatedOn": {}
}],
"updatedOn": {},
"createdOn": {},
"business_owner_id": {},
"bc_coordinator_id": {},
"backup_business_owner_id": {},
"backup_business_coordinator_id": {},
"sme_id": {},
"_class": "com.bcm.bcp.api.model.BcmBcpEntity"
}
expected output:
{{
"bcpId": "",
"bcpName": "",
"bcpDescription": "",
"version": "0.01",
"status": "PENDING",
"scenario.scenario":"---",
"scenario.strategies.strategy.strategyName":"---",
"scenario.strategies.strategy.rto":"---",
etc...
}{
"bcpId": "",
"bcpName": "",
"bcpDescription": "",
"version": "0.01",
"status": "PENDING",
"scenario.scenario":"---",
"scenario.strategies.strategy.strategyName":"---",
"scenario.strategies.strategy.rto":"---",
etc...
}{
"bcpId": "",
"bcpName": "",
"bcpDescription": "",
"version": "0.01",
"status": "PENDING",
"scenario.scenario":"---",
"scenario.strategies.strategy.strategyName":"---",
"scenario.strategies.strategy.rto":"---",
etc...
}}
"scenario.scenario":"---","scenario.strategies.strategy.strategyName":"---",
"scenario.strategies.strategy.rto":"---",
will be coming from the arrays so the output will be number of elements present in the array
U hope this is what you want:
db.collection.aggregate([
{
$unwind: "$scenario"
},
{
$unwind: "$scenario.strategies"
},
{
$project: {
bcpId: 1,
bcpName: 1,
bcpDescription: 1,
version: 1,
status: 1,
scenario: {
scenario: 1,
strategies: {
strategy: {
pSIStrategyDetails: {
rto: 1,
strategyName: 1
}
}
}
}
}
}
])
Output:
[
{
"_id": ObjectId("5a934e000102030405000000"),
"bcpDescription": "",
"bcpId": "",
"bcpName": "",
"scenario": {
"scenario": "",
"strategies": {
"strategy": {
"pSIStrategyDetails": {
"rto": "",
"strategyName": ""
}
}
}
},
"status": "PENDING",
"version": "0.01"
},
{
"_id": ObjectId("5a934e000102030405000000"),
"bcpDescription": "",
"bcpId": "",
"bcpName": "",
"scenario": {
"scenario": "",
"strategies": {
"strategy": {
"pSIStrategyDetails": {}
}
}
},
"status": "PENDING",
"version": "0.01"
}
]
Explanation: You need to use 2 $unwind operators, as it is like arrays of arrays and a $project operator to display only those fields, which you need.
MongoPlayGroundLink
P.S. - The question is still unclear.

Send workflow information to custom connector

I need help with sending workflow information in header/body of calls to custom connector. I am trying to load a drop down list in one of the parameters of a logic app using values returned from an API call. The API end point requires basic workflow information such as the resource group and workflow name which are normally available in headers of http requests from logic app execution.
Normally when I use #{workflow().name} in logic app's json, it is substituted with the workflow name. In case of custom connector, the WDL syntax is passed as is without any transformation.
Here is a simplified swagger json with all relevant sections.
{
"swagger": "2.0",
"info": {
"title": "{{dynamicHostName}}",
"version": "1.0.0"
},
"host": "{{dynamicHostName}}",
"basePath": "/",
"schemes": [
"https"
],
"paths": {
"/sftpsource": {
"post": {
"operationId": "SftpSource",
"summary": "Sftp as source system",
"description": "Use Sftp as source system",
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"parameters": [
{
"name": "params",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"hostName": {
"type": "string",
"x-ms-summary": "Host Name",
"x-ms-visibility": "advanced"
},
"portNumber": {
"type": "string",
"x-ms-summary": "Port Number",
"x-ms-visibility": "advanced"
},
"userName": {
"type": "string",
"x-ms-summary": "User Name",
"x-ms-visibility": "advanced"
},
"password": {
"type": "string",
"x-ms-summary": "Password",
"x-ms-visibility": "advanced"
},
"filePath": {
"type": "string",
"x-ms-summary": "File Path"
},
"system": {
"type": "string",
"x-ms-visibility": "advanced",
"x-ms-summary": "System",
"x-ms-dynamic-values": {
"operationId": "GetTaggedSystems",
"parameters": {
"workflow-name": "#{workflow().name}"
},
"value-path": "systemId",
"value-title": "systemName"
}
}
}
}
}
],
"responses": {
"202": {
"description": "Request is queued"
},
"500": {
"description": "Server Error"
}
}
}
},
"/taggedSystems" : {
"get": {
"operationId": "GetTaggedSystems",
"summary": "Tagged Systems",
"x-ms-visibility": "advanced",
"description": "Get all systems tagged to this flow",
"parameters": [
{
"name": "workflow-name",
"in": "header",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TaggedSystems"
}
},
"202": {
"description": "Work is still in progress"
},
"500": {
"description": "An error occured while trying to fetch tagged systems."
}
}
}
}
},
"definitions": {
"TaggedSystems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"systemId": {
"type": "string"
},
"systemName": {
"type": "string"
}
},
"required": [
"systemId",
"systemName"
]
}
}
}
}
You can have an internal parameter defined as header/body where you can pass dynamic expressions of what you need from the workflow environment at the time of execution of the flow.
For complete information regarding the flow, you can pass #{workflow()} as an internal parameter.
Hope it helps.

change default theme admin of croogo 2.0 (cakephp)?

I try to change the default admin theme for croogo 2.0 ??.. I did all the configuration
existing...but don't work.
thank you to help me
my settings.json
{
"Site": {
"acl_plugin": "Acl",
"admin_theme": "Ace",
"asset_timestamp": "force",
"email": "you#your-site.com",
"feed_url": "",
"home_url": "",
"ipWhitelist": "127.0.0.1",
"locale": "eng",
"status": 1,
"tagline": "A CakePHP powered Content Management System.",
"theme": "Mytheme",
"timezone": 0,
"title": "MyTitle"
},
"Croogo": {
"Api": {
"path": "api"
},
"dashboardUrl": {
"admin":true,
"plugin": "extensions",
"controller": "extensions_dashboard",
"action": "index"
},
"installed": 1,
"version": "2.0.0"
},
"Hook": {
"bootstraps": "Settings,Comments,Contacts,Nodes,Meta,Menus,Users,Blocks,Taxonomy,FileManager,Wysiwyg,Ckeditor"
},
"Access Control": {
"autoLoginDuration": "+1 week",
"models": "",
"multiRole": 0,
"rowLevel": 0
},
"Comment": {
"date_time_format": "M d, Y",
"email_notification": 1,
"feed_limit": 10,
"level": 1
},
"Meta": {
"description": "Croogo - A CakePHP powered Content Management System",
"generator": "Croogo - Content Management System",
"keywords": "croogo, Croogo",
"robots": "index, follow"
},
"Reading": {
"date_time_format": "D, M d Y H:i:s",
"nodes_per_page": 5
},
"Service": {
"akismet_key": "your-key",
"akismet_url": "http://your-blog.com",
"recaptcha_private_key": "your-private-key",
"recaptcha_public_key": "your-public-key"
},
"Writing": {
"wysiwyg": 1
}
}
and I put my theme admin in /public_html/demo/View/Themed/Ace

Resources