Hello All - Thank you for responding. In addition to including a design view of the screen in question, additional comments are provided to help provide better clarity.
Q. Could it be possible that the users facing this issue do not have access to the data source?
A. The data source is a SharePoint site containing several lists used in the application; Dataverse is not used. I have confirmed the users in question do indeed have the necessary access and rights to the site and lists in question. For background, there are four lists used in the application:
- Stocked Items: is the master list of all items available for selection
- Cart: a list that temporarily contains the items the user select from the Stocked Items list and added to their shopping cart. Once they place the order, the items then append into the Orders list; subsequently the items are then deleted from the Cart (all seamless to the user).
- Orders: Contains the contents of the user’s Cart. An order number is generated and status set to indicate it is in progress. Pertinent details from the order then appended into the following Transactions list:
- Transactions: This list contains information from that order and is used in another Power App that permits our warehouse personnel to view it in their system and subsequently take actions, which include processing the item and quantities from our warehouse of stocked items.
For those users who cannot view the contents of their shopping cart, they should be able to view the Cart list. (At the SharePoint list, I can see the Cart list is populated but not presenting on their screens.) And even though they clicked the “Place Order” button, the items themselves do not append to the Orders list for these users, either.
As requested, the following codes are provided:
Order Button (Action: OnSelect):
If(
IsEmpty(cmbAddress.SelectedItems) || IsBlank(cmbAddress.SelectedItems),
Notify(
"Please select Delivery Address and Person",
NotificationType.Information
),
UpdateContext(
{
varOrderID: GUID(),
varIsCC: true in CartCol[@IsPoD],
varIsWH: false in CartCol[@IsPoD]
}
);
Patch(
Orders,
Defaults(Orders),
{
Title: varOrderID,
Delivery_x0020_Address: First(cmbAddress.SelectedItems).Result,
Ordered_x0020_For: First(cmbOrderedFor.SelectedItems).Contact_x0020_Person,
Status: {Value: "New"},
IsCC: varIsCC,
IsWH: varIsWH
}
);
ForAll(
galCart.AllItems As Order,
If(
Order.RezervedQuantity <> Value(Order.txtItemQuantity.Text) && !Order.IsPoD && !Order.togBackOrder.Value && (Order.AvailableQTY - Value(Order.lblTotalItemQuantityCart.Text) >= 0),
Patch(
'Stocked Items',
LookUp(
'Stocked Items',
Title = Order.Title && Status.Value = "Active"
),
{Available_x0020_Quantity: Order.AvailableQTY - Value(Order.lblTotalItemQuantityCart.Text)}
),
Order.RezervedQuantity <> Value(Order.txtItemQuantity.Text) && !Order.IsPoD && !Order.togBackOrder.Value && (Order.AvailableQTY - Value(Order.lblTotalItemQuantityCart.Text) < 0),
Patch(
'Stocked Items',
LookUp(
'Stocked Items',
Title = Order.Title && Status.Value = "Active"
),
{Available_x0020_Quantity: 0}
)
);
If(
Order.togBackOrder.Value && Order.AvailableQTY > 0,
Patch(
Transactions,
Defaults(Transactions),
{
Title: GUID(),
Item_x0020_ID: Order.Title,
Order_x0020_ID: varOrderID,
Transaction_x0020_Quantity: Order.AvailableQTY / Order.PerUnit,
Transaction_x0020_Group: {Value: "Order"},
Item_x0020_Quantity: Order.AvailableQTY,
IsPoD: Order.IsPoD,
Status: {Value: "In Progress"},
Comment: Order.Comment,
Ordered_x0020_By: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & varUser.Email,
Department: "",
DisplayName: varUser.FullName,
Email: varUser.Email,
JobTitle: "",
Picture: ""
}
}
);
Patch(
Transactions,
Defaults(Transactions),
{
Title: GUID(),
Item_x0020_ID: Order.Title,
Order_x0020_ID: varOrderID,
Transaction_x0020_Group: {Value: "Order"},
Transaction_x0020_Quantity: (Value(Order.lblTotalItemQuantityCart.Text) - Order.AvailableQTY) / Order.PerUnit,
Item_x0020_Quantity: Value(Order.lblTotalItemQuantityCart.Text) - Order.AvailableQTY,
IsPoD: Order.IsPoD,
Status: {Value: "Back Order"},
Comment: Order.Comment,
Ordered_x0020_By: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & varUser.Email,
Department: "",
DisplayName: varUser.FullName,
Email: varUser.Email,
JobTitle: "",
Picture: ""
}
}
);
Patch(
'Stocked Items',
LookUp(
'Stocked Items',
Title = Order.Title && Status.Value = "Active"
),
{Available_x0020_Quantity: 0}
),
Order.togBackOrder.Value && Order.AvailableQTY = 0,
Patch(
Transactions,
Defaults(Transactions),
{
Title: GUID(),
Item_x0020_ID: Order.Title,
Order_x0020_ID: varOrderID,
Transaction_x0020_Group: {Value: "Order"},
Transaction_x0020_Quantity: Value(Order.lblTotalItemQuantityCart.Text) / LookUp(
'Stocked Items',
Title = lblID.Text && Status.Value = "Active"
).Per_x0020_Unit,
Item_x0020_Quantity: Value(Order.lblTotalItemQuantityCart.Text),
IsPoD: Order.IsPoD,
Status: {Value: "Back Order"},
Comment: Order.Comment,
Ordered_x0020_By: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & varUser.Email,
Department: "",
DisplayName: varUser.FullName,
Email: varUser.Email,
JobTitle: "",
Picture: ""
}
}
);
Patch(
'Stocked Items',
LookUp(
'Stocked Items',
Title = Order.Title && Status.Value = "Active"
),
{Available_x0020_Quantity: 0}
),
Patch(
Transactions,
Defaults(Transactions),
{
Title: GUID(),
Item_x0020_ID: Order.Title,
Order_x0020_ID: varOrderID,
Transaction_x0020_Quantity: Value(Order.txtItemQuantity.Text),
Transaction_x0020_Group: {Value: "Order"},
Item_x0020_Quantity: Value(Order.lblTotalItemQuantityCart.Text),
IsPoD: Order.IsPoD,
Comment: Order.Comment,
Ordered_x0020_By: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & varUser.Email,
Department: "",
DisplayName: varUser.FullName,
Email: varUser.Email,
JobTitle: "",
Picture: ""
}
}
)
);
Remove(
Cart,
LookUp(
Cart,
Title = Order.Title
)
);
);
ClearCollect(
CartCol,
{}
);
Set(
varItemsInCart,
0
);
Navigate(
ConfirmationScreen,
ScreenTransition.Fade
);
Refresh(Orders);
Refresh(Transactions);
ClearCollect(
PastOrdersCol,
Filter(
Transactions,
Ordered_x0020_By.Email = varUser.Email
)
);
);
Items Property – Shopping Cart Screen:
Filter(
Sort(
CartCol,
Switch(
varSort,
"ID",
ID,
"Name",
Description
)
),
StartsWith(
Description,
ProductSearchBox_5.Text
) || StartsWith(
Title,
ProductSearchBox_5.Text
),
Author.Email=varUser.Email
)
@timl - thank you for the link to Monitor!
