JonL
November 4, 2020, 11:07am
41
A thing that would be cool for the future is to be able to populate droplists from outside sources
by defining in the hjson file a call to a helper function in the module js file. This helper would call the external source(API, file, etc) and populate the dropdown with the data it returns.
i.e. API Modules
I was about to start creating a module for Sendgrid and I wanted to be able to populate a dropdown with the transactional email templates.
Therefore I would need to call with the helper this endpoint and return the results to the droplist.
This would allow cool integrations.
4 Likes
George
November 4, 2020, 1:33pm
42
Having also extensive output schema can also be challenging to define. For example if you want to wrap a good API in a module like stripe or the google APIs they return pretty large outputs
2 Likes
Hello @George ,
custom module and formatter (client -side) will be add in near future ?
George
November 6, 2020, 5:48pm
44
They are added Serhat - that is what this post explains.
ohh so sory I mean client side
sid
November 22, 2020, 2:58pm
46
Hi @George / @patrick . Is there a flag to enable the pencil icon like in Set Value?
George:
dataScheme
Hey @George - how would I handle array/nested data in the dataScheme output for a hjson file?
For example we have this nesting:
And need to be able to use the data in an array, so we can try and sort on end_date.
MH2ag
November 25, 2020, 5:52am
48
Hi @mgaussie ,
have a look at how @patrick did it in my case
You need to define the dataScheme in the .hjson file.
dataScheme: [
{ name: 'numpages', type: 'number' },
{ name: 'numrender', type: 'number' },
{ name: 'info', type: 'object', sub: [
{ name: 'PDFFormatVersion', type: 'text' },
{ name: 'IsAcroFormPresent', type: 'boolean' },
{ name: 'IsXFAPresent', type: 'boolean' }
]},
{ name: 'text', type: 'text' },
{ name: 'version', type: 'text' }
]
Thank you @MH2ag - I thought htat was solved, but for whatever reason my hjson isn’t sending the nesting, as per Patricks instructions. To be honest, it’s not even updating!
MH2ag
November 25, 2020, 6:28am
50
Yes it was solved with the info from @patrick that‘s why I thought it could help you. I got a nested output with this scheme.
What npm module are you using?
JonL
March 19, 2021, 3:37pm
52
@George would you mind writing a small example for the subfolders(as in Stripe) usage.
George
March 19, 2021, 5:00pm
53
Here you go, we support maximum of two nested groups, you can even use fancy layered font awesome icons now
module: "stripe",
action: "createCustomer",
groupTitle: "Stripe",
groupIcon: "fab fa-lg fa-stripe-s comp-data",
groupTitle2: "Customers",
groupIcon2: "fad fa-lg fa-user-tie color-yellow",
title: "Create Customer",
icon: [
{prefix: "fad", iconName: "user-tie", classes: "color-yellow"},
{
prefix: "fas",
iconName: "plus",
styles: {color: "#222"},
transform: {size: 9, x: 10, y: -8}
},
{
prefix: "fas",
iconName: "plus",
classes: "color-green",
transform: {size: 8, x: 10, y: -8}
}
],
...
5 Likes
sid
May 4, 2021, 7:25am
54
In the latest Wappler version, this is causing the pickers to fail.
This value in HSJON results in JSON like:
"$_GET": [
{
"object"
},
{
"object"
}
]
},
Instead, using this works correctly:
globalVars: {
'$_GET' : [{name: 'name', type: 'text'}, {name: 'objectid', type: 'text'}]
},
1 Like
Yes indeed, I will change the docs.
1 Like
George
December 14, 2021, 9:31am
56
Note extension builders! @JonL @mebeingken @sid
We just added support for the on demand node modules installation, so now you can add those to the Hjson as well, see:
Wappler opens up its extensibility powers!
Now you can define your own custom modules and formatters for Server Connect. You can write your own custom code but also provide a UI definition of your extensions so they integrate directly visually in Wappler!
Writing Extensions for Server Connect
Folder Structure
All extensions files are placed in your project folder under the following folders:
for modules:
extensions/server_connect/modules
for formatters
extensions/server_connect/forma…
2 Likes
JonL
December 14, 2021, 11:02am
57
Thanks george! Neat addition
1 Like
George
Split this topic
December 22, 2021, 10:06am
59
karh
January 7, 2022, 3:03pm
60
I want this in the ui of my custom server action:
How can we get this object creator in the UI, any option for that in the .hjson?