Hi everybody,
How would I go about checking to see if a value from an excel table and a text input in my powerapp match? I have a page full of text inputs that patches them into a new row in the Excel document when the submit button is pressed, but how could I rig the submit button to patch an existing row if the first text input is identical to one in the table?
Solved! Go to Solution.
@GenericoName Try this (remember to change table and column names as applicable),
With({varMatchingRecord:LookUp(excelTable, matchColumn=textInput.Text)}
Patch(excelTable, If(IsBlank(varMatchingRecord), Defaults(excelTable), varMatchingRecord), {values to patch})
)
Please remember to give a 👍 and accept the solution as it will help others in the future.
@GenericoName Try this (remember to change table and column names as applicable)
Patch(excelTable, LookUp(excelTable, matchColumn=textInput.Text), {values to patch})
This works for patching existing rows if the value matches up, but is it possible to create a new row with the same button if the value does not match something in the table?
@GenericoName Try this (remember to change table and column names as applicable),
With({varMatchingRecord:LookUp(excelTable, matchColumn=textInput.Text)}
Patch(excelTable, If(IsBlank(varMatchingRecord), Defaults(excelTable), varMatchingRecord), {values to patch})
)
Please remember to give a 👍 and accept the solution as it will help others in the future.
Worked perfectly, thank you!