Hi, Suppose your birthday cake is the record, and the ingredients (sugar, flour, butter, chocolate, raspberries, etc.) are the related records.
Now you want to run scenarios to determine the lowest cost of the cake while varying the ingredients. Each ingredient will differ in unit cost from the others (flour costs less per pound than, say, chocolate). Such a cake might be awful, but you plan to taste them all and come up with a compromise between the best-tasting and the cheapest. So you pick one ingredient to start (let's say flour), and you vary it in the recipe from 5-95 percent by weight, while keeping the overall cake weight the same. Your other ingredients remain in the same proportion to each other, but their total portion of the cake varies because you are changing the flour. So the ingredient weight percentages always total to 100. Your ingredients are entered into a field-type listbox, on the entry form. You start a transaction (it happens to be layered - the transaction, that is - since the data entry form is already in a transaction). You calculate the ingredient amounts and their price extensions, and enter them into the the related fields. You use arrays to record the varying percent flour (5-95 percent), and the total cake cost at each percent flour. The arrays are your product, so to speak, for listing and graphing. Then you cancel the inner transaction. When I do this, I am left with the entry form displaying the last cake cost in the range. Even though the ingredients in the listbox look okay. In the trace window, it also displays the wrong cake cost, so I don't think it's just a redraw issue. It should be displaying the original cake price, before I ran any tests. The only way I've made it work is if I push and pop the cake, which I do before the inner transaction starts and after it cancels. But 4D still thinks that the record has been modified, so when I click to cancel the cake, the code asks me if I'm sure that I want to abandon my changes. What gives? Anyone else had this experience? It's v.14.5 on Windows. Thanks, Don ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************