I have the following code Filtering a gallery: Items property below
With({records:
SortByColumns(
Filter(t_Large_Bids_Rework_Master_Data_PA,
RW_REQUESTOR_Racfid = varCurrentUserRacfid && !IsBlank(RW_Status)
), // closed paren on Filter
"RW_Old_Large_Bid_Number", Descending
)
},
ForAll(records As _item,
Patch(_item, {max: Max(Filter(records, Int(RW_Old_Large_Bid_Number)=Int(_item.RW_Old_Large_Bid_Number)), RW_Old_Large_Bid_Number)})
)
)
Now i need to add an additional AND to the mix:
If i click on row in Upper Datatable (dtbl_Large_Bid) where "Large_Bid_Id" is 8 then i need the bottom gallery(glsy_ReworkId) to only display rows that startwith 8.4, 8.3, 8.2 etc...
Right Now the Bottom Gallery is retunring all rows.
When I add: this to the filter statement:
and Value(Left(RW_Old_Large_Bid_Number,Find(".",RW_Old_Large_Bid_Number))) = Value(dtbl_MyRequests.Selected.Large_Bid_Id)
With({records:
SortByColumns(
Filter(t_Large_Bids_Rework_Master_Data_PA,
RW_REQUESTOR_Racfid = varCurrentUserRacfid && !IsBlank(RW_Status)
and Value(Left(RW_Old_Large_Bid_Number,Find(".",RW_Old_Large_Bid_Number))) = Value(dtbl_MyRequests.Selected.Large_Bid_Id)
), // closed paren on Filter
"RW_Old_Large_Bid_Number", Descending
)
},
ForAll(records As _item,
Patch(_item, {max: Max(Filter(records, Int(RW_Old_Large_Bid_Number)=Int(_item.RW_Old_Large_Bid_Number)), RW_Old_Large_Bid_Number)})
)
)
Dave
@Anonymous
Check out the Trunc() function. It returns the Integer portion of the number with a decimal.