#2 Topics related with App Builder » Put an ABScript function's return value into an ABScript variable » 2016-10-16 15:29:45

Zeng Jinsong
Replies: 3

How to put an ABScript function's return value into a ABScript variable?

I didn't find the correct grammar, roll


Thanks a lot.

#4 Topics related with App Builder » How to copy a variable's value to clipboard by click a button? » 2016-10-15 10:50:59

Zeng Jinsong
Replies: 3

How to copy a variable's value to clipboard by click a button?

Thanks.

#5 Re: Topics related with App Builder » [Solved] Error: 'Node' Undefined, 'Audio' Undefined » 2016-10-14 08:27:03

I upgraded Internet Explorer to version 11, then the errors are disappeared.   big_smile

#6 Topics related with App Builder » [Solved] Error: 'Node' Undefined, 'Audio' Undefined » 2016-10-14 05:41:51

Zeng Jinsong
Replies: 2

Yesterday I re-installed Windows7 64bit OS, and then AppBuilder.

When I run any sample from IDE, the console shows:

Error: "'Node' Undefined" - Line: 186 - Char: 243 - Code: 0 - Url: http://127.0.0.1:9999/builder/scripts/builder.js

Error: "'Audio' Undefined" - Line: 23 - Char: 3 - Code: 0 - Url: http://127.0.0.1:9999/app/scripts/app.js

I think this is the low version Internet Explorer causes, but I'm not sure.
My IE version is: 8.0.7601.17514

Is there someone can confirm this problem?

Thanks a lot.

#7 Re: Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 16:26:41

Use a HTTPClient to get server data , then prepare URL with Records' attribute.

In HTTPClient's Success Event, type:

SetVar "[data]" "[HttpClient1.Response]" "String"

ArrayLength "[data]" "[count]"

Loop "0" "[count]-1" "[ii]"
     ArrayGetItem "[data]" "[ii]" "[row]"
     ObjectGetProp "[row]" "keyword" "[keyword]"
     ObjectSetProp "[row]" "url" "http://www.baidu.com/s?wd=[keyword]"  //Prepare url attribute
endloop

SetVar "[Report1.Data]" "[data]" "String"

In Report's HTML editor, type:

<td>
<iframe ng-src="[trustSrc(Record.url)]" height="280px"></iframe>
</td>

It works correctly.  cool

#8 Re: Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 15:47:09

David wrote:

Hello Zeng,

Yes; I understand. However, AngularJS doesn't allow concatenations in the context of an SRC attribute. If you receive the Records' data from the server, just concatenate the URL in a new record's field and use it in your application.

If the Records' data is local and you use an URL to load it (assigned to the Report control), you must modify the source file to add the appropiate URL record's field. If you use the Records' data variable instead of an URL, you must modify that variable accordingly to add the record's URL field.

Zeng wrote:

I've read all the Report samples before I launch this post. :>

That's good! But other people can also read this post. smile

Okey, I got it.

Thanks very much again!.  smile

#9 Re: Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 15:42:51

David wrote:

Hello Zeng,

I forget we deal with "src" attributes... in this case we can do something like this:

<td>
 <iframe ng-src="[trustSrc(Record.Url)]" width="100%" height="64px"></iframe>
</td>

However, note "Record.Url" must store the complete URL to be loaded into the "IFrame". So you must prepare a record's field with the URL you want to load into the "IFrame". Take a look at the "Report5" sample.

I've read all the Report samples before I launch this post. :>

#10 Re: Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 15:39:55

Hello, David.

The above code works well.

I emphasis on "concatenate" to combine literal strings and Record attributes to get more flexibility just like Post #1.

Perhaps there is a way...

Thank you very much anyway. [:)]

#11 Re: Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 14:55:18

Thank you, David.

I've tried using "{{}}", AppBuilder report error in console:

Error: "[$interpolate:noconcat] [url=http://errors.angularjs.org/1.5.3/$interpolate/noconcat?p0=http%3A%2F%2Fwww.baidu.com%2F%3Fq%3D%7B%7BRecord.keyword%7D%7D]http://errors.angularjs.org/1.5.3/$interpolate/noconcat?p0=http%3A%2F%2Fwww.baidu.com%2F%3Fq%3D%7B%7BRecord.keyword%7D%7D"[/url] - Line: 296 - Char: 13 - Code: 0 - Url: [url]http://127.0.0.1:9898/app/scripts/app.js[/url]

The code is:

<td>
<iframe src="http://www.baidu.com/?q={{Record.keyword}}" width="100%" height="64px"></iframe>
</td>

#12 Topics related with App Builder » How to concatenat URL with Record's attribute in Report's HTML editor? » 2016-10-11 14:25:40

Zeng Jinsong
Replies: 10

How to concatenate URL with Record's attribute in Report's HTML editor?

For example:

<td>
<iframe src="http://www.baidu.com/?q=[Record.keyword]&i=[Record.pageIndex]" 
 width="100%" height="64px" frameborder="1"></iframe>
</td>

But the result is not what I expected.

Thanks a lot.

#13 Re: Topics related with App Builder » How to present the EndOfLine string? » 2016-03-20 15:28:43

Thanks a lot, I got it.

I wrote a function to append messages in a textarea control, like this:

NewDate "" "" "now"
DateFormat "[now]" "YYYY-MM-DD HH:mm:SS" "[sNow]"
SetVar "[msgType]" "Info" "String"
if "[iMsgType]" "==" "1"
  setvar "[msgType]" "Warning" "String"
endif
if "[iMsgType]" "==" "2"
  SetVar "[msgType]" "ERROR" "String"
endif

SetVar "[Line]" "[sNow] - [msgType]:[sMessage]" "String"
SetVar "[txtMessage.Value]" "[txtMessage.Value][Line]\r\n" "String"

I used "\r\n" directly and it works well. tongue

#14 Topics related with App Builder » How to present the EndOfLine string? » 2016-03-20 15:00:13

Zeng Jinsong
Replies: 3

How to present the EndOfLine string?

In VB, it is  chr(13) & chr(10)
In C, it is "\r\n"

But in AppBuilder, how to present it?

Thanks a lot. smile

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.