Hello,
I am able to edit the Internet_view.php file to have both:
- add the currency sign "USD"
- and change the number format to have a Comma (1,000) and Two Decimal Placed
but the problem, such changed get overwritten, whenever I re-generate the project files, i.e., I must configure the above again in the Internet_view.php
$totalPrice = "USD ".number_format[/color]("$row[0]",2,".",",");
$sumRow .= "<td class=\"Internet-Total text-right\">{$totalPrice}</td>";
$sumRow .= '<td class="Internet-Remarks"></td>';
$sumRow .= '</tr>';
$x->HTML = str_replace('<!-- tv data below -->', '', $x->HTML);
$x->HTML = str_replace('<!-- tv data above -->', $sumRow, $x->HTML);
Is there a way to keep these cahnges not to get changed ?
How to keep Changings in TableName_View.php file Permanently?
How to keep Changings in TableName_View.php file Permanently?
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
Re: How to keep Changings in TableName_View.php file Permanently?
Did you see the dataFormat options?
I hope this old thread will help:
viewtopic.php?f=11&t=1614&p=13242&hilit ... mat#p11142
I hope this old thread will help:
viewtopic.php?f=11&t=1614&p=13242&hilit ... mat#p11142
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to keep Changings in TableName_View.php file Permanently?
Hi jsetzer
Thank you ...
The problem, dataFormat changes the type of the numbers to String, I believe, so it does not let you use the Calculated Field, i.e., you cannot use Calculations nor SUM.
Thank you ...
The problem, dataFormat changes the type of the numbers to String, I believe, so it does not let you use the Calculated Field, i.e., you cannot use Calculations nor SUM.
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
Re: How to keep Changings in TableName_View.php file Permanently?
I'm afraid you are right. So maybe, instead of changing overwritable files, you should add hooks/TABLENAME-tv.js and (a) use jQuery to change that sum cell and (b) avoid using calculated fields for calculations mixed with string formatting.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to keep Changings in TableName_View.php file Permanently?
What I mean by (b):
Formatted calculated fields will be overwritten in TV row by row and then lose their format unless you turn it into varchar and format the value in sql.
Personally, I dislike mixing (calculated) numbers and string formatting. In these cases I am usually using after... hook or _init hook for updating numeric fields (not calculated fields). Then I can use dataformat options.
I love calculated fields, but they have their limits. That lazy row by row update in table view is one limit I have faced several times in the past. So I'm using calculated fields very carefully and prefer the hooks way very often.
Formatted calculated fields will be overwritten in TV row by row and then lose their format unless you turn it into varchar and format the value in sql.
Personally, I dislike mixing (calculated) numbers and string formatting. In these cases I am usually using after... hook or _init hook for updating numeric fields (not calculated fields). Then I can use dataformat options.
I love calculated fields, but they have their limits. That lazy row by row update in table view is one limit I have faced several times in the past. So I'm using calculated fields very carefully and prefer the hooks way very often.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to keep Changings in TableName_View.php file Permanently?
Reading your question again,
(c) you can make that overwritable file read only. It will not be overwritten. But then changes in project will not be applied to those files. So, whenever you do changes in overwritable files, not hooks files, you will have the same problems. That's why I almost never do this.
(d) There are one or two experienced superheroes around here who often do such string replacements in header or footer hooks. I don't have examples but this could be a starting point.
(e) I have also seen a tip of Ahmed in his Blog where he changes php files at runtime. I think the blog post was about overwriting existing AppGini php functions by string replacements and overwriting core php files.
(c) you can make that overwritable file read only. It will not be overwritten. But then changes in project will not be applied to those files. So, whenever you do changes in overwritable files, not hooks files, you will have the same problems. That's why I almost never do this.
(d) There are one or two experienced superheroes around here who often do such string replacements in header or footer hooks. I don't have examples but this could be a starting point.
(e) I have also seen a tip of Ahmed in his Blog where he changes php files at runtime. I think the blog post was about overwriting existing AppGini php functions by string replacements and overwriting core php files.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to keep Changings in TableName_View.php file Permanently?
Hi jsetzer,
Noted, will investigate the options and see what to do next.
Again, "Vielen Dank" for your time and valuable thoughts.
Noted, will investigate the options and see what to do next.
Again, "Vielen Dank" for your time and valuable thoughts.
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course