#1 Re: Topics related with App Builder » Replacement of variable name with variable value » 2017-06-02 18:28:54

Don't worry - I solved it.
However, this could drive one nuts if you don't know about it..

Seems like

SetVar "TestObj.TotalRecords] [TotalRecords] "Number"

should be the preferred way to do this?

The variables/entities does not need to be created either..

SetVar "TestObj.SmileyFace] ["yeeeaaaaaah"] "String"

..will work, even though I never did an ObjectSetProp on SmileyFace


#2 Topics related with App Builder » Replacement of variable name with variable value » 2017-06-02 18:22:12

Replies: 2

Hi David!
I sometimes get a replacement when assigning a value to an entity...

ObjectSetProp "TestObj" "TotalRecords" "[TotalRecords]"

Will result in an entity called TestObj.28 = 28
Rather than TestObj.TotalRecords = 28

Any way to fix this - at the moment I do

ObjectSetProp "TestObj" "appTotalRecords" "[TotalRecords]"

which is a bit clunky I think..

#3 Re: Topics related with App Builder » Can events with some code (non empties) be marked up? » 2017-05-04 10:40:05

Brilliant Idea!

I was planning on asking for this same functionality.
David should be careful of loading too much "extras" and making appbuilder top heavy, but that is a very good idea!

Another thing on my wish list.
  Have all the styles in the properties tab that are filled in display above the "Border" as "Filled"
  Then we need not scroll down searching for the filled properties.

#4 Topics related with App Builder » How to fire an Image "Load" event. » 2017-04-05 15:56:05

Replies: 1

Hi David.

Would I fire an Image load event by just placing code into the "Load" part of the image code?

I used your slider example, with the dog,pelican and dog.
I added an Info text field, and placed the following code in the Image1 Load source code module..

GetAttribute "Image1" "src" "[tmp]"
GetAttribute "Image1" "width" "[w]"
GetAttribute "Image1" "targetheight" "[h]"

SetVar "[Info.Value]" "Load:[tmp] [w]x[h] [Image1.Data]" "String"

But the w and h is always undefined, although the tmp value is filled in.

What am I doing wrong?

#5 Topics related with App Builder » Scaled.ab Example hide the Name input » 2017-03-14 12:52:31

Replies: 1

Hi David.

I noticed that when I run the scaled.ab sample, there is a problem when your viewport (you browser window) is smaller than the app height.
If you run the example in Chrome, or other external browser, and you resize the browser window to be smaller than appheight and then click the "Set Fixed Style" or "Set scaled (specific size)", the top part of you screen disappear, and you cannot get to it.

Once you click the "Set Scaled (all viewport)" things return to normal.

1. Do I need to worry about this?
2. Is there a way to fire a "redraw" event - so bootstrap can do it's thing?

#6 Re: Topics related with App Builder » How to prepare a data picker and a time picker too » 2017-03-13 13:22:24

Hi Mr. Esperalta

Very cute datepicker!

I see you used :$rootScope.datePickerIsOpened = true to activate it.
And I cannot find anyplace where you included it into the app?

Seems like it is built into angular?

Can you please direct us to a website if we want to look at more similar goodies hidden away in angular?

Thanks - and keep up the VERY good work!

#7 Re: Topics related with App Builder » Pushing data into an object for a report and when to use square bracks » 2017-02-22 17:13:52

Thanks. That was fast!

I solved my problem -
1.    I used ObjectsetProp "[test]" "B" "[myvalue]"  and not  ObjectsetProp "test" "B" "[myvalue]"
2.    I used test.A in my report - but seems the builtin variable Record.A must be used.


#8 Topics related with App Builder » Pushing data into an object for a report and when to use square bracks » 2017-02-22 16:31:36

Replies: 3

Hi there.

I'm trying to assign data to a report via the ".data" method.
something like this..

newobject "test"
Loop "1" "3" "[I]"
  Loop "1" "4" "[J]"
    ObjectGetProp "[HC1.Response]" "[I].[J]" "[myvalue]"
    VarIsUndefined "[myvalue]" "[Result]"
    If "[Result]" "==" "true"
      AlertBox "[I].[J] = varisundef" "warn"
      ObjectsetProp "test" "A" "[I].[J]"
      ObjectsetProp "test" "B" "[myvalue]"
      ArrayPush "[Report1.Data]" "[test]"

But I get an error :

[e] Error: "[ngRepeat:dupes] http://errors.angularjs.org/1.6.1/ngRepeat/dupes?p0=Record%20in%20Report1.Data%20%7C%20filter%3AReport1.Query%20%7C%20orderBy%3AReport1.Order&p1=object%3A31&p2=%7B%22A%22%3A%223.3%22%2C%22B%22%3A9%2C%22%24%24hashKey%22%3A%22object%3A31%22%7D" - Line: 306 - Char: 13 - Code: 0 - Url:
[e] Error: "[$rootScope:inprog] http://errors.angularjs.org/1.6.1/$rootScope/inprog?p0=%24digest" - Line: 140 - Char: 496 - Code: 0 - Url:

I am trying to list the properties .. with a column A and a column B
In my report.html I have something like...


I also tried..


The other thing - and I'm sorry to ask two questions in one...
When do I use "test" and when do I use "[test]"
As I understand it the only time to use "test" is when you create a new object. All other times you use square brackets.

Or could I create an object from a variable if i use square brackets?

SetVar "[hallo]" "test" String
NewObject "[hallo]"
//Did we created a new object called test? 

#9 Re: Topics related with App Builder » Download files (images, sounds, videos) from server to APP's folder » 2017-02-10 11:32:53

Is this not a good use of localstorage function


localStorage.setItem('CurrentSong', this.src);

And when no internet connection is found, the last song is played?

#10 Re: Topics related with App Builder » Is app running in tablet? With theUserAgent action or Cordova's plugin » 2017-02-10 11:29:16

Running it from windows, I do not get a device.type, device.vendor or device.model.
all the others a filled in.

#11 Re: Topics related with App Builder » Post an AB object to PHP » 2017-02-08 12:41:20

Found my error!

Had a mistake in my httpsetheader command.

Sorry for bothering you.

#12 Topics related with App Builder » Post an AB object to PHP » 2017-02-08 12:11:39

Replies: 2

Hi there David.

Is it possible to post a complete App Builder Object to PHP and get PHP to understand it?


NewObject "myObj"
ObjectSetProp "myObj" "Poepies" "Hallo"
ObjectSetProp "myObj" "Testing" "Whatever"

HttpClearData "HttpClient1"
//not usre if we would us json?
HttpSetHeader "HttpClient1" "Content-Type" "application/json"
HttpSetData "HttpClient1" "HereIsMyObject" "myObj"
HttpExecute "HttpClient1"

#13 Re: Topics related with App Builder » Report Control - Header and Footer » 2017-02-03 11:32:07

Working fine now.
Thanks David!

I believe it would be nice to be able to sort the samples chronological, since new ones tend to blend in with older ones. Maybe just h
Just add the   


and or   


fields in your sample report.

#14 Re: Topics related with App Builder » Report Control - Header and Footer » 2017-02-03 11:12:34

Silly me!

Just had to update my appbuilder, and there is header and footer next to html in the report control.

Very nice!

#15 Topics related with App Builder » Report Control - Header and Footer » 2017-02-03 00:46:46

Replies: 3

Hi there David.

I'm using the report control, and I am having trouble with overflow of report over the footer.
I have 2 htmlcontent controls.
One at the top - call this htmlcontent1
Then the report control inside a container control
Then at bottom of the design area htmlcontent2

inside htmlcontent1 i have something like...

<div class=row>
some header stuff

inside report1,  I have html code for displaying my rows.

and inside htmlcontent2 I again have something like

<div class=row>
some header stuff

However : I find that the report rows bleed over my footer, and I can't get it to stop.
What I have tried so far.
1. Put report1 inside a container, and make the container overflow-y scroll, auto and various other options.
2. Change the report1 wrapper to work with grids and with tables.
3. Move the footer lower down.
4. Used the section directive in my header and footer.

None of these seem to stop the bleeding over.

I'm sure I'm doing something silly, but cannot find it!
Is this something I should handle with CSS?
Or maybe something like ng-header and ng-footer that I can use in actual report1.html

#17 Re: Topics related with App Builder » How to fix a container on the top of one or more app's views » 2017-01-31 22:36:01

Is it not much easier and neater to use the master view for this?
Then you click the "master is visible" on all views where you want the master stuff to "show through".
This means the code is all in one window, and much easier to manage...

#18 Re: Topics related with App Builder » Question about HTML code inside VARS for HTML control » 2017-01-31 18:24:15

Are you trying to do stuff like..

RemoveClass "HtmlContent1.myid1" "hide"


where your htmlcontent1 exist of

<p id=myid1> paragraph 1 </p>
<p id=myid2> paragraph 2 </p>

Because I'm battling with the same thing.
I have an report, and i have two images on the report (in the same record).
When I click on the image, the report1.event.target.id passes back the image id and the Record.ID passes back the current record, but I cannot affect the image from within appbuilder (yet!)
ie. I want to hide an image.

#20 Topics related with App Builder » Reading a complete JSON file into an object? » 2017-01-19 22:21:46

Replies: 3

Is it possible with appbuilder to read a complete JSON file into an object?
Like we do with php.

$json_file = file_get_contents('assets/data/clubs.json');
// convert the string to a json object
$arr = json_decode($json_file);
$title = $arr->result->title;

The exanples of data.json in the report samples all start with a block quote, and not a curly bracket, and we use it by saying something like Record.ID, but usually a json file would start with a curly bracket.
Or am I wrong?

ps. I think the mapping of fields from the json url to the report control is fantastic. But we would have finer control over our app if we could read the json into various objects, and assign these various objects to report controls.

ie. json example

		"title": "Whatever Heading",
		"logo": "lfh.jpg",
		"groups": [{
			"groupname": "Clar Carrot",
			"acronym": "CC",
			"logo": "CC.png",
			"contactnumber": "123",
			"email": "hallo@cc.com"}],
        "data" : [{	"ID":1,
					"Title":"Lorem ipsum",
					"Description":"Lorem ..end."
					"Title":"Lorem 2m",
					"Description":"Lorem ..exit."

#22 Re: Topics related with App Builder » Variable late binding? (And the new AB compiler syntax checker) » 2017-01-18 16:38:05

Thanks for demo svanneste.
I got my program working, seems like I was reading old documentation, where setoption does not use a "String" as third parameter.

It was late at night, and I was rambling a bit.
Since we do not have real syntax checking in app builder, I am battling to find my bugs... Seems as if the best bet is to develop a very small bit in each .ab file, and then later add them all together.

ie. If you have a extra space in your setvar declaration, it can cause problems

  SetVar "[myvar]" "good" "string"
  SetVar  "[myvar]" "oops" "string"

I've decided to upgrade my internet explorer - so my view in appbuilder works. This does help a lot.
(I tend to forget to run the "inspect" when testing in Chrome.)

#23 Topics related with App Builder » Variable late binding? (And the new AB compiler syntax checker) » 2017-01-14 18:04:10

Replies: 8

Look at the code below.
I created two ABScript functions.
1. SetIni - to save data in localstorage using the "SetOption" supplied by App Builder
2. GetIni - to retrieve data in localstorage using the "GetOption" supplied by App Builder

Example Use:

SetVar "[I]" "3" "Number"

SetIni "Comment[I]" "[iNewComment.Value]"
SetIni "Date[I]" "[iNewDate.Value]"
SetIni "Category[I]" "[iNewCategory.ItemIndex]" 

SetVar "[iOption.Value]" "Whatever" "String"
GetIni "[iOption.Value]" "[Result]"
SetVar "[iOptionValue.Value]" "[Result]" "String"


---ABScript---------SetIni [option] [optionvalue]
SetOption "Option" "[OptionValue]" "String"

---ABScript---------GetIni [option] [optionvalue]
SetOption "Option" "[OptionValue]" 
if "[Option]" "==" ""
   return ""
   //"GetIni-Option is blank"

GetOption "[Option]" "[Result]"
// "Retrieved : [Result]"
// "GetIni-Option:[Option], value retrieved:[Result]"

return "[Result]"

Why did I create these functions?
If I use GetOption with a variable in first parameter, it does not work, I think binding of the variable does not happen when lower function is called.
I always find that I have to use SetVar to link Comment and I, and then use the result of that in GetOption.

I found out with the GetIni function, that I cannot define a parameter by address, therefore still need two lines to get the job done.
If I change:

  GetIni "[iOption.Value]" "[Result]"
  SetVar "[iOptionValue.Value]" "[Result]" "String"


  GetIni "[iOption.Value]" "[iOptionValue.Value]"

the value is not filled into iOptionValue.Value.

I guess it would be better for me to create my functions/procedures as java functions rather than ab functions?

#24 Re: Topics related with App Builder » Can we use application's variables inside the Menu control's items? » 2016-12-10 19:01:05

ArraySetItem "[Menu1.Items]" "0" "<span class='glyphicon glyphicon-info-sign'></span> [App.ID]"

Works as well.

Board footer

Powered by FluxBB

Copyright ©2018 DecSoft. All rights reserved.