Custom Cash Register
Application Type
Service Studio Version
11.10.15 (Build 40206)

I am struggling on the best way to handle this situation. Let me paint a quick picture first.  I am creating a reactive app, and I have Users, and with each user, I have members that are specific to each User.  Nothing special there.

I have created a Master/Detail.  On the left (master), I have a list, that lists the members from the database.

When I click on a member, details show up on the right(details).

I need to build a custom Cash Register.  Let's say I have some buttons on the right side of the Master/Detail.  One is $0.25, and one is $1.00.  When the user clicks on the member, and then clicks on a button, it starts to type out a receipt on the right, under the members name.

Then, when you click on another member, and you click on the buttons again, it appends below the first member.

I can't figure out how to "keep" the values from the first member when you select the second member.

At this point, I don't want to send it off to the database yet.  This is more of a "on the screen" display thing.  When the user is done, then it will all be sent to the database.

I am not sure if Master/Detail is the correct widget to use for this situation.

Thanks in advance, and please ask more questions if this doesn't make any sense.

When don't you add a hidden column to the Members table that stores the value you are processing in the cash register? Everytime you update the receipt for each member it updates the value on the Members table.

I failed to mention, I have a transaction table, that stores these transactions.  Plus, I don't want it to post to the database every single time a user clicks each button.

You don't post in the database with this method, you save in the results returned from the database. Later you can save all the data at once in the database.

Hi Todd,

You can store your data on a local variable of the type record list.

Every time you insert new data, you just populate a local record and append it to the local list (for example on OnChange action).

When you save, you just need to iterate the local list to store data on your database.

This should be the way to do it.  I am now working on the logic, trying to figure out how to do this approach.  Ultimately, this should be pretty easy.  Just not sure how to use ListAppend yet.

A little more info for you:

Let's say the member clicks on a button that has a value of $0.25, I need it to add 0.25 to the textlist, then when a member clicks a button that has a value of $1.00, I need it to append to the end of the list which would be 1.00.  So on and so on.

Once the member is done clicking buttons, it dumps all of them transactions to the transactions table.

That is pretty much it for this part of the thing I am working on.

To use the list append, you should do something like this.



On logic to add button :

You can adapt to your logic without some of this stuff on my logic.

Once the member is done clicking buttons, you make the logic to read from this list to generate the correct record to insert on the transaction table. 

This is a fast example, fell free to ask any question.

Best Regards

Got the TransactionList working now.  Added a button to Insert all the items in the TransactionList to the Transaction table, but it only inserts the first record in the list.

I created a ForEach to do this.  There are no errors, but it's not working.  I know that isn't helpful for you.  I feel I do not have the connectors correct.  Not sure yet.

For each Transaction in List you need to create a Record. Like this:

Because when you do a something in the list, the current position is the first record on the list, unless you are inside the for each iteration.

This is so frustrating.  I know someone is always going to say, "you need to go through the Outsystems course, etc.".  I have been through a lot, spent countless hours trying things to learn how to do things, Youtube videos (which is hit-or-miss).  I can't seem to get things working correctly.

I am going to make a new application, re-creating part of the entire application that I am trying to create, and post that app here.  This shouldn't be this hard.

Again, I will layout what I am trying to do:

One the first page, I have a list that is populated from a table.  When you pick on one of the items on the list, it stores that ID to a variable.  Simple.

From a button on the same page, when a user clicks that button, it goes to another page.

On that second page, it has another list from a different table.  When a user clicks on one of the items on the list, it stores that ID in a variable.  Again, simple.

Now, this is where things aren't working.

I have nine buttons that have an amount for each.  When a user clicks each button, it stores a value to a variable.

What I need to happen:

I need to store the ID from the first page, the ID from the second page, all of the amounts from the $ buttons (when a user clicks them), CurrDateTime() on the same row in a transactions table, when they click the total button.

Things I do not understand yet, are when things are Client Actions, and when things are Server Actions in the above items are happening.  I am sure this info is in the courses, but there is a lot of info in the courses, and I am trying to piece things together to get this working.

Again, I will make a new app laying out the above scenario, and post it in this thread.

I know these things are easy for you all, but for someone new, things aren't that obvious.  Again, this is going to be a Reactive Application.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.