Date   

Re: Magic 8.3, no main program

Tim Downie
 

Startprogram in ini is only way I know - no global events in 8.3

What about time for new magjc version?
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Stephen Saxton via Groups.Io <ssaxton2@...>
Sent: Wednesday, 15 August 2018 5:22:35 AM
To: main@magicu-l.groups.io
Subject: [magicu-l] Magic 8.3, no main program
 
Hi everybody

I know in later versions of magic, program 1 always runs when you start runtime.

I'm looking for a way to run a program in 8.3 every time somebody starts the application.

One way I suspect is to use the ini setting "start program = 35", but was looking for maybe a more elegant, maybe something under application event?

Stephen





Magic 8.3, no main program

Stephen Saxton
 

Hi everybody

I know in later versions of magic, program 1 always runs when you start runtime.

I'm looking for a way to run a program in 8.3 every time somebody starts the application.

One way I suspect is to use the ini setting "start program = 35", but was looking for maybe a more elegant, maybe something under application event?

Stephen


XPA 4 - Angular documentation

Arie Zijlstra
 


Re: Odd behaviour of dval() function

Hershel Teitelbaum
 

Removed the trim that was not needed
DotNet.System.Convert.ToDateTime(DNCast('05-Jul-18',DotNet.System.String))


Re: Odd behaviour of dval() function

Hershel Teitelbaum
 

thanks Luuk for p[pointing me to that direction, just the syntax has to be corrected as below in case someone else is looking at this in the future.

DotNet.System.Convert.ToDateTime(DNCast(Trim('05-Jul-18'),DotNet.System.String))


Re: Assigning values to virtuals in a grid

Keith Canniff
 

You initiate the function call in the Init of the virtuals, so they become part of the dataview and automatically populate the grid.

-----Original Message-----
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Avgerinos
Sent: Monday, August 13, 2018 9:51 AM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Assigning values to virtuals in a grid

Hi Keith,

My problem is not how to get 3 values from a single function call (this was answered yesterday in this group, and the solution was similar to the one you suggest )

The problem is that these 3 values are different for each record. How can I execute the calculating-program (or function) on record-fetch of each record?

Regards
Avgerinos

On 13/8/2018 4:10 μμ, Keith Canniff wrote:
If the 3 values can be calculated on one stats run, why not return the value as 1 string (function return) with 3 delimited values in it (let's say they are number values in string form), then use strtoken and strtokenidx to parse out the 3 values into the virtual variable columns?

1 function call, 1 database stats pass, 3 returned values.

Keith

-----Original Message-----
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of
Avgerinos
Sent: Monday, August 13, 2018 9:03 AM
To: main@magicu-l.groups.io
Subject: [magicu-l] Assigning values to virtuals in a grid

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: Assigning values to virtuals in a grid

Frederik Soete
 

Hi Avgerinos,

If your program has a return value, and you want to fetch the returned value per record, why not insert into your dataview a virtual with init expression "CallProg('...'PROG, ...)" ?

We use that technique lots of times ever since V9. E.g. with a vector for multiple returned values.

Op ma 13 aug. 2018 15:51 schreef Avgerinos <mento@...>:

Hi Keith,

My problem is not how to get 3 values from a single function call (this
was answered yesterday in this group, and the solution  was similar to
the one you suggest )

The problem is that these 3 values are different for each record. How
can I execute the calculating-program (or function)  on record-fetch of
each record?

Regards
Avgerinos

On 13/8/2018 4:10 μμ, Keith Canniff wrote:
> If the 3 values can be calculated on one stats run, why not return the value as 1 string (function return) with 3 delimited values in it (let's say they are number values in string form), then use strtoken and strtokenidx to parse out the 3 values into the virtual variable columns?
>
> 1 function call, 1 database stats pass, 3 returned values.
>
> Keith
>
> -----Original Message-----
> From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Avgerinos
> Sent: Monday, August 13, 2018 9:03 AM
> To: main@magicu-l.groups.io
> Subject: [magicu-l] Assigning values to virtuals in a grid
>
> 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: Assigning values to virtuals in a grid

Avgerinos
 

Hi Keith,

My problem is not how to get 3 values from a single function call (this was answered yesterday in this group, and the solution  was similar to the one you suggest )

The problem is that these 3 values are different for each record. How can I execute the calculating-program (or function)  on record-fetch of each record?

Regards
Avgerinos

On 13/8/2018 4:10 μμ, Keith Canniff wrote:
If the 3 values can be calculated on one stats run, why not return the value as 1 string (function return) with 3 delimited values in it (let's say they are number values in string form), then use strtoken and strtokenidx to parse out the 3 values into the virtual variable columns?

1 function call, 1 database stats pass, 3 returned values.

Keith

-----Original Message-----
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Avgerinos
Sent: Monday, August 13, 2018 9:03 AM
To: main@magicu-l.groups.io
Subject: [magicu-l] Assigning values to virtuals in a grid

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: Assigning values to virtuals in a grid

Keith Canniff
 

If the 3 values can be calculated on one stats run, why not return the value as 1 string (function return) with 3 delimited values in it (let's say they are number values in string form), then use strtoken and strtokenidx to parse out the 3 values into the virtual variable columns?

1 function call, 1 database stats pass, 3 returned values.

Keith

-----Original Message-----
From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Avgerinos
Sent: Monday, August 13, 2018 9:03 AM
To: main@magicu-l.groups.io
Subject: [magicu-l] Assigning values to virtuals in a grid

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


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

questions are:
-How to create a WebService with Magic XPI 4.6?
-How to provide a SOAP connected in database?
-How to invoke or use my created SOAP at SSJ to Magic XPA 3.3 Projects? OR Getting data from my soap that I created?
(step by step procedure will be more appreciated OR sample and simple projects!)

I'm sick of this modules that I'm reading, I'm stacked after deploying my Created WebService.
I don't know how to use them properly...

(please help!)

Thank you &
Have a NICE DAY ahead!

Sincerely,
Neil

View/Join This Chat


Re: Function return value(s)

Avgerinos
 

Thanks.
Same date-type, so a vector will do :-)

On 12/8/2018 7:34 μμ, Mike Bannon wrote:
Hi Avgerinos

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)

Mike Bannon
 

Hi Avgerinos

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)

Keith Canniff
 

Avgerinos,

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:


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....
😉
On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote:


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....
😉
On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote:


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....
😉
On Fri, Aug 10, 2018 at 01:40 AM, Luuk wrote:


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....
😉
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

7581 - 7600 of 195968