
I am working on the creation of a component to help manage my application. The component is initialized with a table of items:
Table(
// Amenities
{ // Nav Control Properties
ItemKey: "amenity", ItemDisplayName: "Amenities", ItemIconName: "GiftBox",
// Custom app management properties
SortColumn: "AmenityName",
SortDirection: SortOrder.Ascending
},
// Inventory Items (Header)
{
// Nav Control Properties
ItemKey: "inspection", ItemDisplayName: "Inspection Items", ItemExpanded: true,
// Custom app management properties
ItemHeader: false
},
// Categories
{
// Nav Control Properties
ItemKey: "category", ItemDisplayName: "Categories", ItemParentKey: "inspection", ItemIconName: "WebAppBuilderModule",
// Custom app management properties
SortColumn: "Title",
SortDirection: SortOrder.Ascending
},
// Category Items
{
// Nav Control Properties
ItemKey: "catItem", ItemDisplayName: "Category Items", ItemParentKey: "inspection", ItemIconName: "WebAppBuilderFragment",
// Custom app management properties
SortColumn: "AmenityName",
SortDirection: SortOrder.Ascending
},
...
) // Table
The above "Items" property for the component forces a Reset when changed. The reset copies the table into a collection.
ClearCollect(
ccolItems,
Self.Items
);
The properties under Nav control properties are read-only. The properties under Custom app management properties can be updated as needed.
To perform the update I added a Custom Property defined as follows:
The GridSortColumn has the following code in it:
With(
{
curItem: LookUp(
ccolItems,
ItemKey = Key
)
},
If(
Not( IsBlank( curItem ) ),
If(
// Error: on '<>' in next line
curItem.GridSortColumn <> SortColumn,
UpdateIf(
ccolItems,
ItemKey = Key,
{
GridSortColumn: SortColumn
}
)
);
SortColumn, // Return passed in Sort Column
"" // Return nothing if key not found
)
)
I am getting an error in the above code. I put a comment above the line where I am getting the error.
I do not understand what '_Min' is in the above error.
I tried to setup GridSortColumn_SortColumn (passed property) with a default value, since it is optional. That code is:
LookUp( ccolItems, ItemKey = cgblItemKey, GridSortColumn )
I get an error here to that is just as helpful:
I have no idea what that means.
This was working at one point. It broke when I changed the Key parameter from Optional to Required. Even if I switch it back it still gives me the error.
Any thoughts or ideas would be helpful.
Thank you.
I resolved this. I deleted the SortColumn parameter and recreated it for the property. The error went away and not everything is working.
Thank you.