Hi
I am building a simple checkout. The user presses a button on a row in the list, I use this data to build/update the repeating section.
Checkout1.png
The picture above is the list, this list can be refreshed by changing location.
Alpha help me do this so there is no problem there.
Checkout2.png
Here I am showing the repeating section. The quantity available was found in the list and written to the repeating section.
var Available = {dialog.Object}.listGetValue('List_Daily','Available');
{dialog.Object}.setValue('Available',Available);
Should the customer decide to change collection location the refreshed list may show different values of "Available"
My question is, how do I iterate through the repeating section and update "Available"?
Checkout3.png
I use code of this style to move from the list to the repeating section.
var ContainerName = 'REPEAT';
var FieldName = 'Bagel';
var FieldValue = {dialog.object}.listGetValue('List_Daily','PK_Id');
var CurrentRow = {dialog.Object}.getRepeatingSectionActiveRow(ContainerName);
CurrentRow = {dialog.object}._repeatingSectionLogicalToPhysicalRow(ContainerName,CurrentRow);
var totalRows = {dialog.Object}._getRepeatingSectionRowCount(ContainerName);
for (var i=0;i<=totalRows;i++) {
var row = {dialog.object}._repeatingSectionLogicalToPhysicalRow(ContainerName,i);
var rowValue = {dialog.Object}.getValue(FieldName + ':' + row);
Michael
I am building a simple checkout. The user presses a button on a row in the list, I use this data to build/update the repeating section.
Checkout1.png
The picture above is the list, this list can be refreshed by changing location.
Alpha help me do this so there is no problem there.
Checkout2.png
Here I am showing the repeating section. The quantity available was found in the list and written to the repeating section.
var Available = {dialog.Object}.listGetValue('List_Daily','Available');
{dialog.Object}.setValue('Available',Available);
Should the customer decide to change collection location the refreshed list may show different values of "Available"
My question is, how do I iterate through the repeating section and update "Available"?
Checkout3.png
I use code of this style to move from the list to the repeating section.
var ContainerName = 'REPEAT';
var FieldName = 'Bagel';
var FieldValue = {dialog.object}.listGetValue('List_Daily','PK_Id');
var CurrentRow = {dialog.Object}.getRepeatingSectionActiveRow(ContainerName);
CurrentRow = {dialog.object}._repeatingSectionLogicalToPhysicalRow(ContainerName,CurrentRow);
var totalRows = {dialog.Object}._getRepeatingSectionRowCount(ContainerName);
for (var i=0;i<=totalRows;i++) {
var row = {dialog.object}._repeatingSectionLogicalToPhysicalRow(ContainerName,i);
var rowValue = {dialog.Object}.getValue(FieldName + ':' + row);
Michael
Comment