0

I have a SharePoint Library where the users use the default SP form to create a new document set. Once that happens, several Approvers are to navigate to the item to provide responses. So I have a column in my Library that, when clicked, launches a Canvas app that I want to populate the App's fields with.

I added a Gallery, connected to the Library as well. This is my Form's Item property:

If(!IsBlank(Param("ID")),LookUp(Contracts,ID = varID),Gallery1_1.Selected) 

When I open the form (by clicking the column's link), I have to manually select an item in the gallery in order to populate the form's fields.

My question is, how can I set the Gallery to auto-select an item with the same ID#? Like, if I'm in the library, and click on item 165, the App's gallery will auto-select that specific item when I open the form?

Thanks!

3
  • 1
    Why don't you navigate user directly to 'form' screen instead of 'gallery' screen? Use formula like: If(!IsBlank(Param("ID")),LookUp(Contracts,ID = Param("ID")),Gallery1_1.Selected). Convert ID param in LookUp function to 'Number' type if needed. Let me know if this works for you. Commented Apr 25, 2024 at 18:59
  • 1
    This worked perfectly. Thanks! Commented Apr 25, 2024 at 20:54
  • Great, glad it worked for you! I have added this as an answer below with detailed explanation. Commented Apr 26, 2024 at 5:13

1 Answer 1

1

Here is what you can try for your problem:

  1. When user clicks on the column in SharePoint document library, open Canvas Application and redirect user directly to your "Form" screen based on Param("ID").

  2. Then, write below formula for Item property of form control to:

If( !IsBlank(Param("ID")), LookUp(Contracts,ID = Param("ID")), Gallery1_1.Selected ) 

If above formula shows any warning or error, you can try converting Param("ID") inside lookup function to "Number" type like:

If( !IsBlank(Param("ID")), LookUp(Contracts,ID = Value(Param("ID"))), Gallery1_1.Selected ) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.