#1 Re: Topics related with App Builder » [solved]: SwipeMenu is open after changing View » 2017-03-17 14:19:29

Thanks David,

your sample showed up my mistake. The "left" property of the Container has to be -width, out of the menu,
otherwise it keeps visible. Now it works as expected.

#2 Topics related with App Builder » [solved]: SwipeMenu is open after changing View » 2017-03-16 16:33:45

Antonio.Cambule
Replies: 2

Hi there,

i used the SwipeMenu Samples to make an swipe menu in my app.

In MainView i do:

Show

  SetStyle "MenuContainer" "top" "0px"
  SetStyle "MenuContainer" "left" "0px"

SwipeLeft:

  MenuHide

  // Code of MenuHide:
  RemoveClass "MenuContainer" "slideInLeft"
  AddClass "MenuContainer" "slideOutLeft"

SwipeRight:

  MenuShow

  // Code of MenuShow:
  RemoveClass "MenuContainer" "slideOutLeft"
  AddClass "MenuContainer" "slideInLeft"

  Show "MenuContainer"

1. I open and clode the menu in MainView
2. I change to editview (cancel or save it) --> ReplaceView "MainView"
3. Back in MainView the menu is opened

I tried using Hide "MenuContainer" on MenuHide after the AddClass, that works, but then i do not have any animation

I've seen that there is no sample with more views, so this problem maybe hasn't been seen before?

thanks and regards
Antonio

#3 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-16 15:43:14

Hi David,

as i don't know if you see edited posts....
I've edited my first post of the thread and uploaded the reworked sample.

I have now completely solved my problem.

I've taken your thoughts and made a new routine in Javascript without touching too much the report control.
The data gets sorted accordingly to the grouping and then i write some header property into the array for every first record of the grouped data. If an header exists, the report control shall show it using ng-if=".." but the calculations are made before and not in the report control anymore.

Thank for your help again, it's great what can be done with AB.

regards
Antonio

#4 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 21:08:09

Good Evening,

your example doesn't work for me. I do not need to highlight expired records but group records with the same expiration date, together under one header. When the expiration date is today or tomorrow than in the header there should stand "today" or "tomorrow" for all other records in their corresponding group header should stand the "expiration date".

The sample i sent you is nearly correct. The error there is, that even if the result of the AB-Functions produce the correct value true/false,
the headers are displayed despite their values. So it doesn't matter if they are true or false, they are always shown and that is wrong.

Can you follow me?


Edit:

I found the bugs in my sample and now it works like expected. I have uploaded the new sample to the same place, if you like to see it.
These were the bugs:

1. In AB-Functions using:

  SetVar "[Result]" "String" 
  Return "[Result]" "Boolean"   // IS NOT a boolean value, at least not for the ng-if="...".

  // Changing that to following, it works
  if "myStatement" "==" "true"  
    SetVar "[Result]" "true" "String" 
    Return "true" "Boolean" 
  else
    SetVar "[Result]" "false" "String" 
    Return "true" "Boolean" 
  endif 

2. I thought [Result] inside of AB-Function was somekind of built-in variable like in delphi... I used it wrong,
   because in an other Function i tried to read it using "FunctionNameResult" like you had written in one of your previous answers.
   My mistake. Now I got it ;-)
 

Changing the above things made the trick.

Conclusion: It works. But you are right, in the debugger we can see that it runs through felt a thousand times. A better approach probably would be an special functionality inside of the report control, like you do with filter or sort.
But for now I'm happy with that.

Thank you David for your help and thoughts about this
regards
Antonio

#6 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 15:43:33

Hi David,

i can not figure out why this does not work.

Here is an Screenshot of the Result it produces including some Console Warnings with the AB-Function Results.

This is the report html part:

<div ng-if="$parent.ReportIsGroup($index)" class="report_group">

  <p ng-if="$parent.ReportIsGroupToday($index)">Heute</p>
  <p ng-if="$parent.ReportIsGroupTomorrow($index)">Morgen</p>
  <p ng-if="$parent.ReportIsGroupElse($index)">[Record.Expiration]</p>

</div>

This is one the "ReportIsGroupToday" Function:

Console "" "warning"

// Get Property of current record
ArrayGetItem "[FoodReport.Data]" "[Index]" "[CurrentRecord]"
ObjectGetProp "[CurrentRecord]" "Expiration" "[CurrentExpiration]"

// Change into date, get today date
NewDate "" "" "[TodayDate]"
DateFormat "[TodayDate]" "DD.MM.YYYY" "[Today]"

Console "CurrentExpiration: [CurrentExpiration]" "warning"
Console "Today: [Today]" "warning"

// Check if the dates are equal and store into result
if "[CurrentExpiration]" "==" "[Today]"
  SetVar "[Result]" "true" "String"
else
  SetVar "[Result]" "false" "String"
endif

// return result
Console "Today Result: [Result]" "warning"
Return "[Result]" "Boolean"

Any Idea why the headers are still shown, even if the results are false?

regards
Antonio

#7 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 13:31:58

I use this:

IfEx "( (ReportIsGroupToday(Index) == false ) && ReportIsGroupTomorrow(Index) == false ) "

  return "true" "Boolean"

Else

  return "false" "Boolean"

EndIf

ReportIsGroupToday and ReportIsGroupTomorrow are also AB-Functions with Index Parameter and boolean return

But this doesn't work...

#8 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 13:05:11

Hi David,

I'm quite there, just one last question to complete this functionality...

Is it possible to call existing functions with return result inside of other functions?

Example:

if CallFunction1WithReturn == true && CallFunction2WithReturn == true

  doSomething

else
 
  doSomethingElse

endif

#9 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 11:50:15

Yes, but the main problem here is...

while the report goes through the records, i need to know not only current record details, but also the previous one to check against them.
Is this possible?

#10 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-15 11:22:59

Hi David,

the sample looks nice. I think it could be an solution. What i need in that case is the change of the record value in order to show the header or not. Here an Sample Code:

<p ng-if="<!-- Record has changed -->" style="background-color: yellow">
  [Record.Expiration]
</p>

<!-- ... the rest of the record -->
 
[Record.ID] - [Record-Name]

Is that possible to achieve? I think something about a Script Execution inside of the ng-if (like in the input ng-change="$parent.ReportCountChange(Record.ID)), where i can check the old record.expiration against current record expiration?

#11 Re: Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-14 21:01:57

The Problem is, that i need as much headers as groups and that is variable, depending on the records in data.

The case is, i have a list of products with an expiration date, the groupfield is this date. I may have 2 products expiring tomorrow,
three in a week, 10 in two weeks... and so on.

I hope this is clearer?


Edit 1:

If grouping is not possible...

An other idea could be, that instead of grouping i use an filter mechanism. A select control with two pregiven filters:
default (today, tomorrow and the next day),  only today, the rest of the select would be filled with the dates from the whole data (without today). Selecting one, filters the report to the given value, so that only records with that date are shown. That would be a possible
solution to show the data.

#12 Topics related with App Builder » [solved]: Is it possible to group Report data? » 2017-03-14 15:22:58

Antonio.Cambule
Replies: 19

Hi there,

I've seen that it is possible to order data in report control.
I would need to group data, means i like to have a group header for every records that match that group.

Example: Group by Date

01-02-2017 (Header)
Record 1 (Row)
Record 3 (Row)
Record 6 (Row)

15-02-2017 (Header)
Record 2 (Row)
Record 5 (Row)
Record 9 (Row)

20-02-2017 (Header)
Record 4 (Row)
Record 7 (Row)
Record 8 (Row)

and so on

Is that somehow possible?

regards
Antonio


Edit: Solution

Here is an ready solution sample on how we can group records and show it in the report control with an group header.


Definition of Group:
  1. Logical sorting. Means, first sort the data by a sort criteria
  2. Show the sorted record under a given group name/description: Header

This sample:
Uses an usually german datestr DD.MM.YYYY as sort criteria. That means, that i had to convert it into something
sortable. For this there are some converting routines in the sample that first makes an JS-Date from the string, and
then casts the value into an number value that is used for the sorting.

Sorting: A bubblesort algorithm is used. See, that in the algorithm itself i have implemented the above described conversion
for the datestring before the comparing could be done.

The code is commented, so it shouldn't be too hard to customize for other needs.

The report control is not touched too much, just to check if a group header shall be shown.
The sorting and setting of group header is done completely with Javascript in the data array.

Sample Download

#13 Re: Topics related with App Builder » [solved]: Missing App Icon on Android » 2017-03-14 15:15:03

Aah, yes. I used the debug only when i wanted to really debug something. I didn't see thats it saves my changes first...
Works nice, no need to change things (but my own behaviour ;-) )

Then it's really cool that the build, rebuilds also the icons and splash

Thanks and regards
Antonio

#14 Re: Topics related with App Builder » [solved]: Missing App Icon on Android » 2017-03-14 15:04:03

Hi David,

i don't think this was an good idea. The build process is needed to run also the app after every change. Processing also the icons now, increases the build time, means longer wait before execute...

Anyway, despite your current change the run and build functions in AB could be improved for a better workflow.

What about following workflow ideas:

1. Clicking on run button saves the project, builds it (build without icons and splash screen) and runs the app
2. Clicking on build button, builds it including the icons and splash screen

What do you think?

regards
Antonio

#15 Re: Topics related with App Builder » [solved]: Missing App Icon on Android » 2017-03-14 11:12:50

Hi David,

thats strange. I've did that before, as i read it in a post prior to ask, and it didn't work. I've tried it again after your answer.
Now it works.

Thanks
Antonio

#16 Topics related with App Builder » [solved]: Missing App Icon on Android » 2017-03-13 20:01:24

Antonio.Cambule
Replies: 10

Hi David,

you know i had to rewrite my app. I got it so far, in order to make it better than before i reworked some parts.
Instead of using local storage where memory is limited, i use cordova file.
That part works fine now, but in the first i had problems to compile the app using the batch file.
The problem was the limitation of path lenghts.
When i understood that, i changed the my project path to the root directory. On the way to that, i also had to update cordova.
So now I'm running on the latest cordova version.

So far the preamble...

The problem now is, that after these changes i do not get the app icon anymore. I took a look in the appbuilder pathes and appbuilder correctly copies my icon into its subpaths but after the execute of the compile.bat i see that in the res folder of the android subfolder the icon is still the default appbuilder icon.

Any ideas?

Thanks and regards
Antonio

#17 Re: Topics related with App Builder » [solved]: Get value change event of html input inside a ReportControl? » 2017-03-06 14:38:19

Hi David,

thanks a lot. That's great. To point 4, i need it in order to do value validation and change the value to something valid, if it doesn't fit.
I got it to work. The report control is such a great thing. I could style and change into the behaviour we had in mind. Doesn't mean that it is good ;-), but it's great to have this freedom.

As always good support, thanks
Antonio

#18 Topics related with App Builder » [solved]: Get value change event of html input inside a ReportControl? » 2017-03-06 10:43:01

Antonio.Cambule
Replies: 4

Hi David,

I've put an

  <input id="MyInput" type="text" value="[Record.MyValue]"></input>

inside the html property of an Report Control.

Now i don't want to catch the click like it is used in many samples:

  If "[MyReport.Event.target.id]" "==" "MyInput"

But i want to catch the event when the value is changed. Is that possible?

Thanks and regards
Antonio

#19 Re: Topics related with App Builder » Can Date Input Value be shown formatted? » 2017-02-28 15:25:38

Is it possible then, to use a text input (to show the value formatted) and open up the native date selection (lets say on click),
or do i have then to fully customize my own date selection?

#20 Topics related with App Builder » Can Date Input Value be shown formatted? » 2017-02-28 14:33:35

Antonio.Cambule
Replies: 3

Hi there,

I would like to show the DateValue inside of the Date Input formatted like this:

DD.MM.YYYY

I've seen several posts how to bring date values formatted into a text input or how to manipulate it
to show in other control, but is it also possible to show it formatted directly in the date input?

thanks and regards
Antonio

#21 Topics related with App Builder » Serialization (like in Agenda Example) and Casting for Num and Dates » 2017-02-28 14:21:51

Antonio.Cambule
Replies: 1

Hi there,

I have a Date Input and a Number Input on my view.
I used the Agenda example to serialize/deserialize data in local storage.

To get the values into the inputs i use:

  
    // For number:
    ObjectGetProp "[Item]" "Count" "[TempNumber]"
    StrToNumber "[TempNumber]" "[CountInput.Value]"    

    // For date:
    ObjectGetProp "[Item]" "ExpirationDate" "[RecordDate]"
    NewDate "[RecordDate]" "" "[TempDate]"
    DateToJSDate "[TempDate]" "[ExpirationInput.Value]"

If do not cast the values i get errors.
So, is this the right way to go, do i need to cast them into the
correct types? Is there a an other approach to consider?

thanks and regards
Antonio

#22 Re: Topics related with App Builder » [solved]: Is it possible to have a swipe control? » 2017-02-27 18:16:42

Hi David,

one last question on this one. How to get lets say ClientY to use in AB?
I couldn't figure out.

thanks
Antonio

#24 Re: Topics related with App Builder » [solved]: In need of an multi line Alert- or Messagebox » 2017-02-27 16:06:08

Hi David,

thanks for your input. I've tried out both solutions now,
i didn't know that the Alert will be used as native alert, so yes this one looks good and is multiline. Fits my needs for now.

I also like the dialog solution, just one question here. Is it possible to make the DialogView smaller than the other views?
I ask that because when i show the dialog in modal its so large that is scrolls ab bit and i would like to prevent the dialog view from scrolling,
it should be less in the height.

thanks and regards
Antonio

#25 Topics related with App Builder » [solved]: In need of an multi line Alert- or Messagebox » 2017-02-27 09:52:54

Antonio.Cambule
Replies: 14

Good morning,

while I'm trying to get my validation run, i noticed that it is not possible to use
linebreaks inside AB Alertbox oder Messagebox. Or better, i can use it and it gets parsed but
but no linebreak will be executed.

Could this be changed?

I've seen that a JS-Alert can use linebreaks, but they don't look so fancy like the AB ones ;-)

thanks and regards
Antonio

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.