Hi, my price calculations are not working properly. Here are three problems:
(1) The Bestellpreis $0.00 is the total price of the two orders customization_frontend and customization_functionality. It should add those two numbers (which it does according to the Test of the formula), but for some reason only 0$ is displayed.
The formula of total price looks for the prices in the Form table and takes all the products of this rows’ Quote_ID:
SUM ( SELECT (Form[Price], [Quote_ID] = [_THISROW].[Quote_ID]))
(2) When I create a form that calculates the price according to the package and the chosen size (both per dropdown), the price ($67.2000) is not calculated real time, only after I hit save. Is there a way to make the price change real time depending on what I choose from my dropdown list?
(3) I have a virtual column and a data set column. Both calculate the current price of a product by multiplying two values that I look up in other tables. Both have this formula:
[Workdays] * [Daily_Rate]
For some reason, only the virtual price calculates the correct price. Real price always stays $0, even though the Test in the formula works.
I thought it might be because virtual columns get compiled last and therefore have all the values they need, whereas real columns calculate while other columns are caluclated and therefore use $0 even though it is 100$. Can you schedule column expressions so that certain expressions are compiled last?
All of these problems are part of the same category, that’s why I put them together.
If you need information to be able to answer this question let me know.
I assume you have placed this expression into the App Formula of the Total column - which is a"normal" table column not a Virtual Column?
The package data is in a different table than your Total value is. If you change one of the package rows, you have to do something in the app to signal that you want the Total updated as well.
Since you indicated you wanted a real-time update, you need to handle the update on the device side. You are making the changes to the package rows, it appears, from the Table in the Detail view. SO…you really only have once choice…
…Add an action to the Form Save behavior of your Package Form view - where you are making the change. This action will “touch” the row that has the Total value triggering its update.
To do this, you will need 2 actions:
First action is of type, “execute an action on a set of rows”, identifies the parent row needing the Total updated and then calls the second action.
Second action makes an edit on that parent row to trigger the App Formulas. Sometimes you don’t have a column that you can just apply an update to. In these cases I will add an “Edit Count” column and simply increase it by 1 each time. This at least gives me other information such as how many times the Total was updated.
Then in your Packages_Form, insert the first action into the Form Saved behavior setting. See image.
I hope this helps! This is very general, so please ask questions!
Hey WillowMobileSys,
thank you very much for your quick reply!
So you are saying because my Form table where user input values use references from other columns to calculate the price, the total price does not change in real time when changing options from my drop down, right?
I’m just wondering, because I have a different drop down menu where people can choose a person to work with. And when I change the person in the dropdown, the wage column of that person is changing as well and I don’t even have to hit save. It just changes with the drop down value itself. Isn’t there a way to make it work like this?
Anyway, I’m trying to implement your solution.
I need two actions.
In the trigger action, I want to set the values of my Edit_Count column to _THIS + 1, but under “Set these columns”, the column doesn’t even appear.
How should the 2nd action look like?
And is the first one correct?
I think, correct? My understanding is that when in the view on the original post, you select one of the Package rows or even tap “Add” to add a new one and the Total Value does not update.
The main issue is that you accessing the Package rows directly for editing.
If you were to edit the Package rows from the Parent Form, I think you would see the Total column automatically update in that use case.
What I mean is, open the row that holds the Total column in a Form View (instead of a Detail View) and also show the Package Child rows - likely as an Inline Table very much like what you are seeing in the Detail View.
This does require setting up the Parent/Child relationship using the “Is part of” property. (I can help setup if you show your tables).
When you access, the Package rows in this manner, edit them (or add a new one) and return to the Parent Form, the Parent row will automatically perform an update triggering any App Formulas.