cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

Hello,

 

I currently have a app that fills out a form that writes back to SP, but I want the user to be able to create two forms at the same time and easily nagivate between the two. When submitted, I want there to be two entires in SP for botht the forms and within my browse screen 

 

I have tried mulitiple ways to do this and have been unsuccsesful so far.  I have tried creating two identical forms both with the same data source, with a navigation button between them and used another button with "SubmitForm(Form1); SubmitForm(Form2) " to have it create to entries in SP, but have failed to get it to work.

 

Does anyone know how to do this? please let me know if yo uhave any additional questions

 

Thanks

11 REPLIES 11
jhall Continued Contributor
Continued Contributor

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.


@Anonymous wrote:

I have tried mulitiple ways to do this and have been unsuccsesful so far.  I have tried creating two identical forms both with the same data source, with a navigation button between them and used another button with "SubmitForm(Form1); SubmitForm(Form2) " to have it create to entries in SP, but have failed to get it to work.

Well, that's primarily how to do it (if you're linking directly to SP that is).  If you have two different lists in SP (which I'm assuming is the case), then you should be able to have multiple "forms" open (even on the same page) and to submit them manually via the SubmitForm() function.

Are you copying the same values to both forms though?  Is that the problem?  Meaning I want to enter a "problem description" in one and then copy it over to the other one?  If the data is essentially a duplicate you can set the "Default" value of fields to be linked to other fields.

You also have the option of the Patch() function to manually write out data to a list, but I don't think you need to punt in that direction just yet.

A screen shot might help if I've made any incorrect assumptions above.

Community Support
Community Support

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

Hi @Anonymous 

 

Could you please share more details of your forms?

Are these two forms's data source same or different?

 

Best Regards.

Yumia

Anonymous
Not applicable

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

@v-yuxima-msft 

 

I am currently working on digitizing a form. It is ment to evaluate two people at the same time. I made one form, but need to create an identical one so the user can fill out both at the same time. I am not sure if I should implement a tab or a button to go back and forth.

 

I am currently using one data source, but dont know what the best option would be. 

 

Please let me now if you have any more questions.

 

Thanks

jhall Continued Contributor
Continued Contributor

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

So you're essentially working w/ the same questions but for two different users, correct?  Like, I'm watching a Nurse and a Doctor and recording what they are doing at the same time as they interact with a patient?

jhall Continued Contributor
Continued Contributor

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

It really does come down to the spacing you have per your UX and if you are using a phone or tablet/desktop interface.  If you are using a tablet interface, I'd leave it all on the same screen and have them displayed side-to-side running vertically w/ infinite scroll.  If you wanted to divide them up at a later time (e.g. tabs), then you can programmatically hide one column of questions via either button or tab as you initially expressed.

I'd also probably want to change the background color of the entire form when you select a field in either of them.  Help to reinforce which "person" they are answering questions on at that time.  

There is nothing stopping you from having two forms on the same page except real estate.

Anonymous
Not applicable

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

@jhall 

 

Exactly, but in this case its a flight observer observing flight attendent A and B, using the same exact form using the same exact criteria. 

 

This is where I am coming int oproblems. I seem to only create one entry. 

 

If i had it side by side, Would i just have to create two forms and just reformat them (on tablet mode btw)?

 

I was worried that if I put a button to navigate through each one, I might lose progress due to switching to the other document. I like the color idea I will try that Thanks

 

One last note. since the forms are Identical, would it be better to have Form A and Form B write to different data sources? Like below? or would it work using one?

Form1

DataSource = DataSource_A

Form2

DataSource = DataSource_B

 

Thanks

jhall Continued Contributor
Continued Contributor

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.


@Anonymous wrote:

If i had it side by side, Would i just have to create two forms and just reformat them (on tablet mode btw)?


Yep.  If it's always 1-2 people (not more) then it would be a decent UX choice.  You could conceivably also have a sideways scrolling series of forms for >2 people in this scenario and/or expand/collapse the columns from 2->1 if you wanted to include that for the user to choose.  Personally, if it's a quick checklist of stuff that you're tracking for 2 people simultaneously, then having 2 columns visible and you just hit each out as they do their tasks makes it easiest (user fills left, then right, then goes down a row, lather/rinse/repeat).

 


@Anonymous wrote:

One last note. since the forms are Identical, would it be better to have Form A and Form B write to different data sources? Like below? or would it work using one?

Form1

DataSource = DataSource_A

Form2

DataSource = DataSource_B

Only if it makes sense to you from a developer-perspective.  It won't impact delivery.  Is this a model-based form where you're connecting to a data source and issuing a NewForm() to start the process?  SharePoint list the location of the data?

 


@Anonymous wrote:

This is where I am coming int oproblems. I seem to only create one entry. 

I am betting that you are not submitting each form (or only have one form).  One reason I suggested doing this on "one screen" is that it gets you past the questions of variable scope and if you're going to lose data.  Even if you just make a particular form "invisible" (e.g. visible=false) and then hide/show each form, you'll never lose any data.

 

I will admit that you've got me a little curious on the application.  I haven't needed to do a simulataneous form for 2 people at the same time, but it makes sense for more complex scenarios involving multiple people.  Regardless, you should be able to do it similarly to the explanation above.

Anonymous
Not applicable

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

@jhall 

 

I showed what my current form lookes like below. I created the form from a blank canvas app and created the Form from my data source (SP). I use OnSubmit = SubmitForm(Form1) to have the form write to SP. There is a decent amount of information as you can see (not including the 7 additional headers with three questions in each). I am not sure what would be the best UX experience. IS there a way to have a tab that would say A and B? You talked about programmatically hiding one column, could this be done as a form? I am not sure if I should create two seperate screens. 

 

SP is the list is the location of the data and It soes issue a NewForm() to start the process.

 

You mention being able to make a particular form "invisible" (e.g. visible=false) and then hide/show each form, how would you be able to navigate bewteen the two, through a button?

 

Sorry for all the questions. Just new to the application and trying to find the best method because I plan on making dozens of more forms the same exact way

 

Thanks,

 

Sam

jhall Continued Contributor
Continued Contributor

Re: Create a tabbed with 2 identical forms that would create two entries in SharePoint when Submitted.

I see probably where things get hairy for you.  But I also see you're just doing a single Submit (e.g. SubmitForm(Form1)).  So that's why you're only getting one entry.  You only have one Form.

 

You can create two completely identical Forms (e.g. Form1 & Form2) that speak to the same data source.  You're just opening new records (in the same data source) for each when you do a NewForm(Form1);NewForm(Form2).

I would suggest you have the common details (e.g. Flight info, etc.) in a collapsible section.  Once they enter the details on it, it slides up and "hides" itself (see my blog post here), but can be re-extended.  Then your two forms take up the bulk of the page to the left/right side.

I will say that this is assuming the user is simultaneously evaluating same THING at the same time for each person (e.g. uniform).  Otherwise, it might make sense to allow them to show/hide each individually.

I can do a mock up if I have time today and anything's unclear.  

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,822)