Search found 659 matches

by pböttcher
2019-12-08 21:20
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Sorry,

can you try

Code: Select all

SELECT time_format(TIMEDIFF(`timesheet`.`day_1_to`,`timesheet`.`day_1_from`),"%H.%i")
FROM `timesheet`
WHERE `timesheet`.`id`='%ID%'
there was a missing backtick.
by pböttcher
2019-12-08 19:20
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Hi,
can you try:

Code: Select all

SELECT time_format(TIMEDIFF(timesheet`.`day_1_to`,`timesheet`.`day_1_from`),"%H.%i")
FROM `timesheet`
WHERE `timesheet`.`id`='%ID%'
What type of field is your calculated field? What codepage are you using?
by pböttcher
2019-12-08 17:49
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Can you post your "old" code that gives results and the new one you that you put in.
by pböttcher
2019-12-08 15:51
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Hi, no worries, AppGini gives you a lot out of the box, and a lot of possbilities, but if you want to do more than what is provided out of the box, you need to get onto coding a little bit. for your question. Try SELECT time_format(TIMEDIFF(timesheet`.`day_1_to`,`timesheet`.`day_1_from`),"%H:%i") FR...
by pböttcher
2019-12-08 10:59
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Hi, glad it works. can you show a sample of that data you are using for the calculation. Also the default behaviour for the calculated fields is as you described. Calculation happens after saving the record. If you want to do some calculation at data entry you can do that via Javascript. register on...
by pböttcher
2019-12-07 19:44
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Hi, you need to put in a sql query. So try SELECT TIMEDIFF(`timesheet`.`day_1_from`,`timesheet`.`day_1_to`) FROM `timesheet` WHERE `timesheet`.`id`='%ID%' assuming that day_1_from is your start time and day_1_to is you finish time . Also assuming that your primary key of timesheet is called id
by pböttcher
2019-12-07 17:46
Forum: Getting Started
Topic: Calculating the number of hours
Replies: 16
Views: 100

Re: Calculating the number of hours

Hi,

can you post your complete query, and what are you getting (and expecting) as result?
by pböttcher
2019-12-05 22:29
Forum: Getting Started
Topic: Using AppGini Filters + $options->QueryWhere = causes SQL syntax error?
Replies: 4
Views: 132

Re: Using AppGini Filters + $options->QueryWhere = causes SQL syntax error?

Hi,

it can be that you need to check if the QueryWhere is empty. If so you can apply the WHERE Clause if not you need to append you filter by adding it as " AND" Clause.

Did not try that but could be.
by pböttcher
2019-12-04 12:59
Forum: Getting Started
Topic: BLOB datatype
Replies: 6
Views: 77

Re: BLOB datatype

Hi, the image in AppGini is stored as a file on the filesystem. Hence if you want to store it into the DB, you can use the after_insert/after_update hook, read the file (image) for that record from the filesystem and put it into the blob field. You should not use the same field, as in the image fiel...
by pböttcher
2019-12-01 21:18
Forum: Advanced Customizations > Others
Topic: Language file
Replies: 3
Views: 110

Re: Language file

Hi,

this is not possible, as the %s is just replaced by the username.

If you want to change that you need to edit the membership_profile.php around line 116.
by pböttcher
2019-11-25 19:23
Forum: Advanced Customizations > Others
Topic: Convert data to QRCODE and Share
Replies: 4
Views: 156

Re: Convert data to QRCODE and Share

Hi,

you may have a look at

https://github.com/jeromeetienne/jquery-qrcode

this is very easy to implement.
by pböttcher
2019-11-23 10:28
Forum: Advanced Customizations > Others
Topic: calculate how many DAYS have passed since a date in a lookup field
Replies: 4
Views: 135

Re: calculate how many DAYS have passed since a date in a lookup field

Hi,

please try

SELECT
DATEDIFF(`appuntamenti`.`data_appuntamento`, NOW())
FROM `partecipazione_evento_pubblico` left join `appuntamenti` on `partecipazione_evento_pubblico`.`data_evento` = `appuntamenti`.`pri_key`
WHERE `partecipazione_evento_pubblico`.`pri_key` = '%ID%'
by pböttcher
2019-11-22 20:14
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Ok, clarified the issue with David. The table is called differently, so the correct code to work is

$j(function(){
$j('#eff_link').after($j('#eff_link').clone().prop('id', 'Materials_link' ).attr("href", "materials_view.php").html($j('#eff_link').children().clone()).append(' Materials'));
})
by pböttcher
2019-11-22 19:13
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Otherwise try

$j(function(){
$j('[id$=_link]:last').after($j('[id$=_link]:first').clone().prop('id', 'Materials_link' ).attr("href", "materials_view.php").text('new').html($j('[id$=_link]:first').children().clone()).append(' Materials'))
})
by pböttcher
2019-11-22 19:02
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Did you try

$j(function(){
$j('#Efficiency_link').after($j('#Efficiency_link').clone().prop('id', 'Materials_link' ).attr("href", "materials_view.php").html($j('#IEfficiency_link').children().clone()).append(' Materials'));
})
by pböttcher
2019-11-22 15:54
Forum: Advanced Customizations > Others
Topic: Convert data to QRCODE and Share
Replies: 4
Views: 156

Re: Convert data to QRCODE and Share

Hi,

do you want to store the qr code after saving the record, or only display the qr code on the page?
by pböttcher
2019-11-22 14:12
Forum: Advanced Customizations > Others
Topic: calculate how many DAYS have passed since a date in a lookup field
Replies: 4
Views: 135

Re: calculate how many DAYS have passed since a date in a lookup field

Hi,

try

SELECT(
DATEDIFF(`appuntamenti`.`data_appuntamento`, NOW())
FROM `partecipazione_evento_pubblico` left join `appuntamenti` on `partecipazione_evento_pubblico`.`data_evento` = `appuntamenti`.`pri_key`
WHERE `partecipazione_evento_pubblico`.`pri_key` = '%ID%'
by pböttcher
2019-11-22 13:45
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Hi,

please try to wrap the code in

$j(function(){
<code>
}
by pböttcher
2019-11-21 18:50
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Sorry my mistake,
can you put the script in quoting-dv.js
by pböttcher
2019-11-20 20:15
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

you can add the code through the quoting-tv.js file in the hooks section.
by pböttcher
2019-11-20 18:55
Forum: Advanced Customizations > Hooks
Topic: Adding a custom Tab
Replies: 16
Views: 541

Re: Adding a custom Tab

Hi, you can try $j('#Efficiency_link').after($j('#Efficiency_link').clone().prop('id', 'Materials_link' ).attr("href", "materials_view.php").html($j('#IEfficiency_link').children().clone()).append(' Materials')); This shall add a button to the materials TV. Please check all names as I'm not sure whi...
by pböttcher
2019-11-19 20:12
Forum: Advanced Customizations > Hooks
Topic: AppGini 5.81 number format
Replies: 21
Views: 731

Re: AppGini 5.81 number format

Hi, ok, so there was a missunderstanding. If you want to see the result in the table view with your format, you should change back the type to decimal, or integer (if you do not use decimals). montant total you can create in the hooks folder a file called membres-tv.js. Add the following to the file...
by pböttcher
2019-11-19 18:49
Forum: Getting Started
Topic: How to get App Title into PHP variable?
Replies: 3
Views: 448

Re: How to get App Title into PHP variable?

Hi,

thanks for the correction. Indeed, I missed this statement during copy&paste. If you need the variable more often it makes sense to put it as a feature request. So far, I did not need it yet.
by pböttcher
2019-11-18 22:01
Forum: Advanced Customizations > Hooks
Topic: AppGini 5.81 number format
Replies: 21
Views: 731

Re: AppGini 5.81 number format

Hi,

I think you need to change the type for the field Montant TOTAL to varchar (10) or what suits you best.
by pböttcher
2019-11-18 21:54
Forum: Advanced Customizations > Hooks
Topic: AppGini 5.81 number format
Replies: 21
Views: 731

Re: AppGini 5.81 number format

Even so I'm not Olaf, hope it works now.