Assigning values to virtuals in a grid
Avgerinos
Hi magicians
I 'm facing the following problem: I have an online task with a grid displaying a table. There are 3 more columns which correspond to virtual-variables, with their contents calculated (by record) on the fly. The calculation is based on some database statistic-processing. All 3 values are related, so I can have all 3 values in one database-stats run. The solution I found so far to display these calculated values correctly on the grid, was to create a 3 functions, each calculating a value and assigning it to each virtual. My problem is that since I use 3 functions, I end up executing the statistic processing 3 times (instead of 1) and this is the cause for slow grid-drawing and navigation. Any ideas to improve? Thanks in advance Avgerinos
|
|
Re: Magic v4
Arie Zijlstra
I couldn't make it work yet.
After installing node.js I ran npm install -g @angular/cli When I choose "generate web application" it doesn't generate angular.json. I also tried combining (merging) it with ng new my-app But then I only see the empty application I generated
|
|
Creating WebService using Magic XPI 4.6
#chat
A new chat has been created: Hi, I would like to learn (basic=>expert) consuming WebService in Magic XPI 4.6
|
|
Re: Function return value(s)
Avgerinos
Thanks.
toggle quoted messageShow quoted text
Same date-type, so a vector will do :-)
On 12/8/2018 7:34 μμ, Mike Bannon wrote:
Hi Avgerinos
|
|
Re: Function return value(s)
Mike Bannon
Hi Avgerinos
toggle quoted messageShow quoted text
If the required return values were all of the same data types, i.e. all alphas or all numerics, you could use a vector. Or you could pass back a character-separated string, such as "abc¬99¬xyz" and parse this in the calling programme using the StrToken function. HTH Mike Bannon DataFormation Ltd., UK
-----Original Message-----
From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Avgerinos Sent: 12 August 2018 17:13 To: main@magicu-l.groups.io Subject: [magicu-l] Function return value(s) Hi magicians Is there any way to return more than one values from a function? Parameters are input-only. So far, I can only think of passing the var-index ('XX'VAR) as a parameter and use VARSET in the function to update it. Any alternatives? Regards Avgerinos
|
|
Re: Function return value(s)
Avgerinos,
toggle quoted messageShow quoted text
Pass a blob and pass back and forth whatever content you want. This way you could pass an entire table in and out of a function (mtblset, mtblget), or just a simple alpha field with some delimiter that separates the values passed back. HTH Keith
-----Original Message-----
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Avgerinos Sent: Sunday, August 12, 2018 12:13 PM To: main@magicu-l.groups.io Subject: [magicu-l] Function return value(s) Hi magicians Is there any way to return more than one values from a function? Parameters are input-only. So far, I can only think of passing the var-index ('XX'VAR) as a parameter and use VARSET in the function to update it. Any alternatives? Regards Avgerinos
|
|
Function return value(s)
Avgerinos
Hi magicians
Is there any way to return more than one values from a function? Parameters are input-only. So far, I can only think of passing the var-index ('XX'VAR) as a parameter and use VARSET in the function to update it. Any alternatives? Regards Avgerinos
|
|
Re: Magic v4
It looks like the same output as I am seeing.
The purpose of the example, (as in 'what can/should it do') is not known to any one but the person who created this. Short version on how to get the WebSamples running: 1) follow the menu in Studio under 'Web' (set correct settings, and generate 2) Open CMD prompt and do a CD to the directory specified in 'Web Application folder\ProjectName' 3) run 'ng serve' Output is like this: C:\temp\output\WebSamples2>ng serve ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** 33% building modules 194/195 modules 1 active …ic-xpa\engine\fesm5\magic-xpa-engine.js Wait for this to complete... 4) Extecute the project (CTRL+F7 from Studio), and go to http://localhost:4200 with your browser Because the default program is 29 under 'Web Application Settings/StartProgram', the Root-example is always shown. To test one of the programs 2-23, it's possible to run this individual program using F7. Also, there's a bug in WebSamples/Program14 'Format', It is impossible to have an expression on the 'Format' of a field (what this example tries to show!)
|
|
Re: Magic v4
robertbdinaguit@...
On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote:
On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote: On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote: On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote: Hi all, I try to run the web sample project, but i doubt if i've done the right thing, i could not find any references, how to's.... Attach sample output.
|
|
Re: Odd behaviour of dval() function
dotnet.System.Convert should work if you add 'System to het CRR
CRR can be reached hitting SHITF+F7 change 'Type' to '.net' then hit 'F5' on the column 'Name', and pick 'System' (versie 4.0.0.0) from the list. now you should be able to update a Date field with this expression: DVAL(dotnet.Convert.ToDateTime("5-Jul-18").ToString(),'yyyy-MM-dd')
|
|
Re: Odd behaviour of dval() function
Hershel Teitelbaum
Thanks sounds like a good alternative, but i'm missing something because magic is giving me an invalid error and i'm not too familiar with dotnet
i'd appreciate if you can spell me out exactly the expression that should work. TIA Hershel
|
|
Re: Odd behaviour of dval() function
oops....
dotnet.Convert….. should have been: dotnet.System.Convert…..
|
|
Re: Odd behaviour of dval() function
dotnet.Convert.ToDateTime("5-Jul-18") should give the proper DateTime.
or: DVAL(dotnet.Convert.ToDateTime("5-Jul-18").ToString(),'yyyy-MM-dd')
|
|
Odd behaviour of dval() function
Hershel Teitelbaum
XPA 3.1 I have to update to a date variable with date string imported from a CSV file, the date string format is like 5-Jul-18, without pad filled 0, when I enter the expression dval(vDateString,’DD-MMM-YY’) it returns a 0 date. However if the string date format is 5/7/18 and I update with dval(vDateString,’DD/MM/YY’) it does work properly. I’ve seen in the past that magic doesn’t handle it correctly when we import directly To a date variable, and therefore I imported to an alpha variable first. But in this format, it doesn’t even work with an update using dval, I guess I’ll have to go the messy route of 0 pad filling myself the day part of the date.
Anyone have seen this before or any better solution?
Thanks Hershel
|
|
Re: Use API in Magic XPA 3.3
Andreas Sedlmeier
P.S.: If you do a lot with MongoDB and APIs you may have a look into https://restheart.org/ . That's a pretty powerful API. Mo need for Magic on server side then basically unless you have some legacy code. It's JSON only, XML you have to add yourself.
|
|
Re: XPA 4 Web Client
Arie Zijlstra
|
|
Re: Use API in Magic XPA 3.3
Andreas Sedlmeier
On Thu, Aug 9, 2018 at 09:59 AM, Neil wrote:
Hi Andreas,What exactly do you mean with "API's for XML" resp. what do you intend to do. There's SOAP and "REST", SOAP is XML webservices, REST is basically simply http where payload could be XML too but more often is JSON because XML implies some overhead. SOAP is basically the only thing supported by Magic (with Apache Axis since 3.3), REST you have to implement by feet - with basically no support by the platform/framework (Magic). Is this going to be an "internal" API or something you want the world / business partners to use ? Andreas
|
|
Re: Use API in Magic XPA 3.3
Chris de Bijl
I use newtonsoft to read and create json in XPA
Or you can use merge templates.
Don’t use xml converterts, you don’t have control over type conversions
like boolean, numeric or time.
There is an example in the file section, how to simply read json in
XPA.
Chris
From: Neil
Sent: Thursday, August 9, 2018 9:28 AM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Use API in Magic XPA 3.3 Hi
Tim, Should I convert Json to XML or there's no need for it? Thank you!
|
|
Re: Magic v4
LOLZ:
*** Thank you for using ngx-infinite-scroll! *** Please consider donating to our open collective
to help us maintain this package. https://opencollective.com/ngx-infinite-scroll/donate
***
added 68 packages in 25.586s Did MagicSoftware pay some money, or are they waiting for paying customers.... 😉
|
|
Re: Magic v4
'images' seems to be missing? (al least my 'images' directory is empty....!)
|
|