Hi @PowerAppNewb ,
Regarding the needs that you mentioned, I think PowerApps canvas app could achieve your needs.
Firstly, you could generate a canvas app based on your SP List or create a canvas app from scratch. Then within the app screen, add a button control, called "Get Code", set the OnSelect property of the "Get Code" button to following:
Set(
CodeValue,
LookUp('Your SP List', FilteredColumn = "xxx").CodeColumn
)
The above formula would find the Code value from your SP List based on a specific filter condition, then save it into a variable. You reference the acquired Code value through the CodeValue variable directly.
If you want to choose a Code value from your SP List randomly, I think the Shuffle function could achieve your needs:
Set(
CodeValue,
First(Shuffle('Your SP List')).CodeColumn
)
above formula would choose a Code value from your SP list randomly, then save it into a variable.
In addition, if you want to fill some additional columns next to the code value the user is requesting in your SP List, please try the following formula:
Patch(
'Your SP List',
LookUp('Your SP List', CodeColumn = CodeValue),
{
AdditonColumn1: User().FullName,
AdditionColumn2: User().Email,
....
....
}
)
Patch function
LookUp function
If you want these Codes which have already been requested not to be requested again, please consider modify above Shuffle formula as below:
Set(
CodeValue,
First(
Shuffle(
// Filter out these record which has been requested already
Filter('Your SP List', IsBlank(AdditionColumn1) && IsBlank(AdditionColumn2) ...)
)
).CodeColumn
)
Please try above solution, check if it could help in your scenario.
Regards,