Forum Discussion
Creating a button that makes a choice On Click
Hi
I have created a PowerApp within a PowerBi dashboard.
It has a "Comment" writeback function to a Sharepoint list
Visual below has the "Invoice Number" (Can be Alpha Numeric) as a row record on the sharepoint list
So it shows up the comments for this record
If the row record does not exist on the Sharepoint list nothing shows
What i would like to be able to do is when selecting button
It works as described below:
If Row Record exist then Navigate to Update Form
Else Navigate to Create Record Form
Hope someone can help
Hi Ibendlin
Thanks for your guidance,
I used the below code to make the switch work -
If(IsBlankOrError(LookUp('ACTION_&_COMMENT_LIST2',ThisItem.ROW_ID="")), Navigate(IssueUpdateForm ),Navigate(CreateRecordForm))The strange thing that i have been struggling with is getting the order of the argument, i thought Navigate(CreateRecordForm should go before Navigate(IssueUpdateFormand using the ROW_ID="" i had been trying to use 0ThanksCarl
6 Replies
- lbendlinSuper User
What i would like to be able to do is when selecting buttonThat's not how this works. You need to select the row, not the button. When you select the row that selection should then filter the PowerApp visual, and you can fetch that via PowerBI.Integration.
- Carl143Frequent Visitor
Hi Ibendlin
Just to clarify
1) Yes i select the row which selects the Invoice Number,
a) If there is no record on my Sharepoint List Comments box is blank, which is the expected result.
b) If there is a record on the Sharepoint list it retrieves the Comment, which is the expected result
2) Rather than have 2 buttons,
a) one which takes you to "Update Form" where you can edit the details on the form
b) The other takes you to "Create Form" (Via Patch) to create a new row record
I would like to have one button which recognizes if a row record exists or doesnt exist and takes the user to the correct form, "Update Form" or "Create Form"
- lbendlinSuper User
Why have two forms? how are they different?