Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
I appreciate your help.
In the below script, I have to display only amount2 from table2 for any key values. But if amount2 not present then amount 1 from table1. Unfortunately I am getting both amount1 and amount2 when both are greater than zero for any key. I have attached my sample application, kindly share your ideas.
Kind regards,
Kiru
Hi,
Did you mean to join your tables instead of concatenating them ?
Try to replace the "Concatenate" with "Join" and check if this will get the results you wanted.
Hi,
I tried join but still I am getting the duplicate values.
I appreciate your time.
Kiru
Ok,
In table2, there's no key with value 2, so you want to consider the amount1 from table1 which is 500.
for key 443567, it is present in both tables, the amount is the same 429.
for key 1936, it's also present in both tables, but the priority is for table2 where the amount is 2971.
So amount2 is the field you need to consider in your case, not the amount1.
If not, can you write down the expected result so we can figure out how to modify the script.
Hi,
Thanks again for your reply.
You exactly got my requirement. Everything is working good except when both tables has different amounts for a key.
In this case 1936.
So when I try to show the key and new_amount in a table box. For key 1936 it is displaying both the amounts which is 2834 and 2971. But as per my requirement I need only to display 2971 and I don't want to show 2834 in my final_amount.
I hope you understand but kindly let me know if you didn't got it.
Kind regards,
Kiru
Exactly,
if you don't need the field amount1 in your table "link", then you can drop it, or just comment it in the last load.
in your app, i think you only need to use the field amount2 from the table "link" since it represents the final amount to consider between the initial amount1 and amount2.
Yes, I did that but still amount2 is showing both the values. I have attached the application for your reference.
Kindly let me know for any other possibilities.
Kiru
Use join instead of concatenate, and that's it.
Hi,
My sincere thank you but I think I can't use join because, it is taking a lot of time to reload my original application.
Regards,
Kiru
I see,
How about keeping both of your tables and getting the final amount on the chart ?
Check the file attached (I added a straight table that checks and calculates the final amount to consider).