Imagine real world of invoicing. When you want to generate an invoice to a customer you have 2 possibilities with DueDate: or you write the Due days and the system calculates automatically the due date, or you enter the DueDate and the system calculates the due days.
So, in attached bsv we have a form where we select the Invoice Date suppose 02/21/2017, then we enter the duedays of 33, automatically the system puts DueDate=03/26/2017 (Correct)
If I enter 34 -> the system corrects and puts 33 and 03/26/207 (nothing works above 33 and 03/26/2017).
http://screencast-o-matic.com/watch/cbnrqN6DgM
Any ideas please?
Updating Fields based on each other value
Updating Fields based on each other value
- Attachments
-
- updating_fields_based_on_each_other.zip
- Sample BSV
- (35.34 KiB) Downloaded 514 times
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
-
- Posts: 1459
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Updating Fields based on each other value
This isn't going to be helpful, but I can't replicate your problem.
Re: Updating Fields based on each other value
Have you tested with my bsv and followed the video?PointsWell wrote:This isn't going to be helpful, but I can't replicate your problem.
1. Create new Invoice with Date: 02/21/2017
2. Enter Due Days = 33 --> as result the system will put DueDate = 03/26/2017
3. If you enter DueDays =34 --> the system will put DueDays=33 and DueDate=03/26/2017 (WRONG)
I use build 2238.
Thank you for your reply and testing this.
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
-
- Posts: 1459
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Updating Fields based on each other value
I used your BSV and did the same steps that the video shows - the only thing different is that I am on Build 2237 on a Mac
Re: Updating Fields based on each other value
I have tested further and noticed that the Rules have problems with February and March.
I thought is because February has 28 days, but what the x!@#%^$ with March? With the other 10 months the rules are functioning ok.
I use DAY_DIFFERENCE function in the rules. Is something there?
Thx,
I thought is because February has 28 days, but what the x!@#%^$ with March? With the other 10 months the rules are functioning ok.
I use DAY_DIFFERENCE function in the rules. Is something there?
Thx,
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Updating Fields based on each other value
UPDATE!!!
It's not functioning with January also!!!
Just tested the DAY_DIFFERENCE function:
1. If you summarize the date 01/01/2017 + 100 =>you'll get 04/11/2017 2. IF you do DAY_DIFFERENCE(01/01/2017, 04/11/2017) => you'll get 99
It's not functioning with January also!!!
Just tested the DAY_DIFFERENCE function:
1. If you summarize the date 01/01/2017 + 100 =>you'll get 04/11/2017 2. IF you do DAY_DIFFERENCE(01/01/2017, 04/11/2017) => you'll get 99
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Updating Fields based on each other value
You should use DATE_ADD when adding days to a Date type field, rather than a Date+33
IF (Invoices.InvoiceDate WAS CHANGED OR Invoices.DaysDue WAS CHANGED)
THEN
Invoices.DateDue=DATE_ADD(Invoices.InvoiceDate,Invoice.DaysDue)
IF (Invoices.InvoiceDate WAS CHANGED OR Invoices.DaysDue WAS CHANGED)
THEN
Invoices.DateDue=DATE_ADD(Invoices.InvoiceDate,Invoice.DaysDue)
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
Re: Updating Fields based on each other value
The attached bsv works
- Attachments
-
- DateFix.zip
- (35.23 KiB) Downloaded 542 times
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
Re: Updating Fields based on each other value
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Updating Fields based on each other value
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
Re: Updating Fields based on each other value
WTF ?
Same bsv is behaving differently on 2 systems, that's makes me to think that something is different between builds.
I'm using build 2238, Windows 2012, MySql 5.6
Same bsv is behaving differently on 2 systems, that's makes me to think that something is different between builds.
I'm using build 2238, Windows 2012, MySql 5.6
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Updating Fields based on each other value
Same build - linux - mysql 5.5.50
Browser?
Browser?
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
Re: Updating Fields based on each other value
I've tested in Chrome and Firefox .....same thing...rob_h7 wrote:Same build - linux - mysql 5.5.50
Browser?
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Re: Updating Fields based on each other value
I have installed new VPS with windows 10, AwareIM trial version, default DB => the result is same thing.
https://screencast-o-matic.com/watch/cbnZQF6qyu
No more ideas!!!!!!!!!!!!!!!!!!!!!!!!!!!
https://screencast-o-matic.com/watch/cbnZQF6qyu
No more ideas!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42