#1 Topics related with App Builder » Properly usage of the DateGet and DateSet actions » 2016-10-10 17:06:41

andy
Replies: 1

hello David

what goes wrong with this code, because result isn't correct

NewDate "" "" "[CurrDate]"

DateGet "[CurrDate]" "year" "[SelectedYear]"


DateGet "[CurrDate]" "month" "[SelectedMonth]"


DateGet "[CurrDate]" "day" "[SelectedDay]"


AlertBox "[CurrDate] != [SelectedDay]/[SelectedMonth]/[SelectedDay]" "primary"

Andrea

#3 Re: Topics related with App Builder » Various random questions while evaluating App Builder » 2016-10-10 16:36:11

hello david

thx for you replay, eveerything is clear now, Unfortunately i cannot reproduce the matter that happeded anymore,

i have one more question, what goes wrong with this code, because result isn't correct

NewDate "" "" "[CurrDate]"

DateGet "[CurrDate]" "year" "[SelectedYear]"


DateGet "[CurrDate]" "month" "[SelectedMonth]"


DateGet "[CurrDate]" "day" "[SelectedDay]"


AlertBox "[CurrDate] = [SelectedDay]/[SelectedMonth]/[SelectedDay]" "primary"

#4 Topics related with App Builder » Various random questions while evaluating App Builder » 2016-10-07 17:07:07

andy
Replies: 5

hello

i'm about to evaluate you ab software and i have some questions:

1) how can i filter record in array? for example if i have data container and i want filter record for start date and end date before use it in report control

2)how does the required value of input control work? it seem that no popup apper or other event start

3) i was playing with with datetime and save data and i found this bug probably

//this code work and save all data
ObjectSetProp "[NewRecord]" "DYear" "[NewSelectYear.Value]"
ObjectSetProp "[NewRecord]" "DMonth" "[NewSelectMonth.Value]"
ObjectSetProp "[NewRecord]" "DDay" "[NewSelectDay.Value]"

//this code doesn't work and make a mess inside json data container
ObjectSetProp "[NewRecord]" "Year" "[NewSelectYear.Value]"
ObjectSetProp "[NewRecord]" "Month" "[NewSelectMonth.Value]"
ObjectSetProp "[NewRecord]" "Day" "[NewSelectDay.Value]"

3) in agenda example i found this routine, last line shoud be EndLoop or not?

// Iterate all the Report Data records
Loop "0" "[DataLen]" "[I]"

  // Get the current iterated record and their ID property
  ArrayGetItem "[AgendaReport.Data]" "[I]" "[Item]"
  ObjectGetProp "[Item]" "ID" "[RecordID]"

  // If the record's ID is the same we are editing now...
  If "[RecordID]" "==" "[CurrentRecordID]"
  ...
  EndIf
EndIf

4) testing this code i found that total is not the sum of all amount but a string of a concatenated value, i'm i doing something wrong?

SetVar "[Total]" "0" "Number"
...

While "[i]" "<=" "[DataLen]"
  ArrayGetItem "[Report1.Data]" "[i]" "Record"
  SetVar "[HtmlText]" "[HtmlText]<tr><td>[Record.Amount]</td></tr>" "String"
  SetVar "[Total]" "[Total]+[Record.Amount]" "Number"
  inc "[i]"
EndWhile  
...

thx Andy

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.