cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Billwill81
New Member

Using a form to open another form with variable

I have a form from one SP list and want to open another SP list which are associated via common field name. I use a global variable to open the first form from a gallery.  Would like to open the second form with the associated record opening in the 2nd form. Not sure how to link the variables.  Appreciate your help in advance. 

3 REPLIES 3
GarethPrisk
Resident Rockstar
Resident Rockstar

To clarify a few things:

  1. This is a Canvas App
  2. You have SharePoint as a data source, for List 1
  3. You have SharePoint as a data source, for List 2
  4. The Lists above are correlated via "common field name"
    1. What do you mean by this?
  5. You have a Gallery
    1. What is the data source of this Gallery?
    2. Presumably, the OnSelect property is what is setting your variable
  6. You have a Form control, which should show an Item from SharePoint List 1
  7. You have an additional Form Control, which should show an Item from SharePoint List 2

 

If these are all true, then you should simply be able to

  • For the OnSelect property of your Gallery
    • Set a variable, such as gblSharePointRecordList1
    • Set a variable, such as gblSharePointRecordList2
    • These would be set by doing a LookUp, or Filtering, the individual lists based on what the user has selected in the Gallery, to derive the two records in the separate SharePoint lists
  • Set the DataSource property of Form 1 to SharePoint List 1
  • Set the DataSource property of Form 2 to SharePoint List 2
  • Set the Item property of Form 1 to gblSharePointRecordList1
  • Set the Item property of Form 2 to gblSharePointRecordList2

 

Probably some more nuance to this, so let me know if you have any questions.

1. Yes it is a canvas app

2 & 3.  Yes they are two SP lists

4.  They have a common field “RID” it is the primary key for SP List 2 and this same field with same number is in SP List 1. 
5.  Yes the gallery source is SP List 1; yes use Onselect command to open SP List 1. 
6.  Yes use form control to open item of SP List 1. 
7.  I want to use a button to open a pop up window with a form from SP List 2 in view mode. 

RESULTS:  

1.  Set(varNAME, thisitem) or Set(varNAME, thisitem.RID)

2. Item  varNAME. 

3.  Datasource SP List 2. 

            *** ERROR MESSAGE *** Invalid formula Expected a value compatible with “Datasource” 

 

thank you for your assistance in advance 

suez-SOGS
Frequent Visitor

I am having the same issue.  The form won't accept the variable as a source.  I am getting: Invalid formula Expected a value compatible with “Datasource” 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,118)