cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Working with forms with different quantity fields, different type of fields, and field order forms V

I have the following problem.

 

My environment has several experiments, each experiment will come with a different number of fields of evaluations.

 

Experiment Number 580-2017 - 5 Fields -> go to screen: 5Forms (different fields and quantities of fields, and save to different worksheets / tables)

Experiment Number 450-2017 - 7 Fields -> go to screen: 7Forms
Experiment Number 560-2016 - 9 Fields -> go to the screen: 9Forms

 

I created a field that takes amount of evaluations, ThisItem.Number_Aval in a TextBox, and then the value of this, I

Concatenate(TextBoxNt.Text;"Forms") 

- generating 5Forms / 7Forms (value concatenate, which is also the name of several screen) in an InputText with name of TextBoxNFormTrat

 

 

This result of the TextBoxNFormTrat, placed in the navigate:

Navigate(TextBoxNFormTrat;ScreenTransition.Cover)

, but Navigate only accepts Destination.

 

 

Is it possible to change the screen target, based on the amount of field quantities?

 

Or is it possible to pass this field value to the Navigate Context?

 

Navigate ('FormsGeneral'; ScreenTransition.Cover; {NumberFields})

 

 

And would it be possible for the FormsGeneral screen, with an EditForm, to modify for each different quantity and type of valuation?

 

Edit 

 

I followed the example of https://powerapps.microsoft.com/en-us/tutorials/function-updatecontext/

 

1-screen-UpdateContext.png1-screen-UpdateContext-4Tratamento.png1-screen-UpdateContext-5Tratamento.png

 

 

 

 

 

 

 

 

 

 

 

 

And then I chose the number of treatments, the second screen shows the text referring to the number of treatments.

 

Instead of a text field, would it be possible to display an EditForm for each treatment?

Would you do an EditForm for each treatment? Does each treatment have its data source?
Example: Form5 -> Data-5.xlsx | Form6 -> Data-6.xlsx | Form7 -> Data-7.xlsx and .....

Or is it possible only with an EditForm, changing the data source, but how to confirm that the fields are being shown in the correct order?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: Working with forms with different quantity fields, different type of fields, and field order for

I believe I solved it

 

Initial Screen - Have a list the Treatments in a BrowseGallery1, in the button for the evaluations has following Navigate

Navigate (Trat; ScreenTransition.Fade; {NumTrat: BrowseGallery1.Selected.Number_Experiment_Fields})

{NumTrat: BrowseGallery1.Selected.Number_Experiment_Fields} - moves to second screen the amount of Treatments.

 

I got this by reading http://stackoverflow.com/questions/39232599/pass-a-value-to-another-screen

 

Second Screen in BrowseGallery2 - Items

If (NumTrat = 5, Fields_5, NumTrat = 6, Fields_6, NumTrat = 7, Fields_7)

Connecting to the correct database, related to the amount of treatments.

 

If(
	NumTrat = 5; "5 Treatments";
	NumTrat = 6; "6 Treatments";
	NumTrat = 7; "7 Treatments";
	NumTrat = 8; "8 Treatments";
	NumTrat = 9; "9 Treatments";
	NumTrat = 10; "10 Treatments";
	NumTrat = 11; "11 Treatments";
	NumTrat = 12; "12 Treatments";
	NumTrat = 13; "13 Treatments";
	NumTrat = 14; "14 Treatments";
	NumTrat = 15; "15 Treatments";
	NumTrat = 16; "16 Treatments";
	NumTrat = 17; "17 Treatments";
	NumTrat = 18; "18 Treatments";
	NumTrat = 19; "19 Treatments";
	NumTrat = 20; "20 Treatments";
)

In the Second Screen - IconNewItem, To add values, but opening the correct form, with the amount of fields required, previously passed.

If(
	NumTrat=5;NewForm(FormTrat5);;Navigate(Fields5;ScreenTransition.Cover);
	NumTrat=6;NewForm(FormTrat6);;Navigate(Fields6;ScreenTransition.Cover);
	NumTrat=7;NewForm(FormTrat7);;Navigate(Fields7;ScreenTransition.Cover);
	NumTrat=8;NewForm(FormTrat8);;Navigate(Fields8;ScreenTransition.Cover);
	NumTrat=9;NewForm(FormTrat9);;Navigate(Fields9;ScreenTransition.Cover);
	NumTrat=10;NewForm(FormTrat10);;Navigate(Fields10;ScreenTransition.Cover);
	NumTrat=11;NewForm(FormTrat11);;Navigate(Fields11;ScreenTransition.Cover);
	NumTrat=12;NewForm(FormTrat12);;Navigate(Fields12;ScreenTransition.Cover);
	NumTrat=13;NewForm(FormTrat13);;Navigate(Fields13;ScreenTransition.Cover);
	NumTrat=14;NewForm(FormTrat14);;Navigate(Fields14;ScreenTransition.Cover);
	NumTrat=15;NewForm(FormTrat15);;Navigate(Fields15;ScreenTransition.Cover);
	NumTrat=16;NewForm(FormTrat16);;Navigate(Fields16;ScreenTransition.Cover);
	NumTrat=17;NewForm(FormTrat17);;Navigate(Fields17;ScreenTransition.Cover);
	NumTrat=18;NewForm(FormTrat18);;Navigate(Fields18;ScreenTransition.Cover);
	NumTrat=19;NewForm(FormTrat19);;Navigate(Fields19;ScreenTransition.Cover);
	NumTrat=20;NewForm(FormTrat20);;Navigate(Fields20;ScreenTransition.Cover)
	)

These answers helped me.

http://stackoverflow.com/questions/37521245/navigate-to-a-screen-by-its-name-in-powerapps https://powerusers.microsoft.com/t5/PowerApps-Forum/Navigate-to-a-screen-by-it-s-name/m-p/2454#M1352

 

Only problem of this solution, and I have to create several screens and in each one place the respective form.

 

A screen (AllFields screen) with a unique form? Exchanging only the data source and showing the correct form fields, would it be possible?

 

In the DataSource of the Form put

If (NumTrat = 5, Fields_5, NumTrat = 6, Fields_6, NumTrat = 7, Fields_7)

But managed to control which fields appear or not, the order they appear?

 

Files of project.

https://1drv.ms/f/s!AijLzG3Pzbarq267wW4GHdhtqS4H

View solution in original post

2 REPLIES 2
Highlighted
Helper V
Helper V

Re: Working with forms with different quantity fields, different type of fields, and field order for

Really interesting thought about display an EditForm for each treatment, I think it is not possible now. But would be happy if someone can prove me wrong.

Highlighted
Helper II
Helper II

Re: Working with forms with different quantity fields, different type of fields, and field order for

I believe I solved it

 

Initial Screen - Have a list the Treatments in a BrowseGallery1, in the button for the evaluations has following Navigate

Navigate (Trat; ScreenTransition.Fade; {NumTrat: BrowseGallery1.Selected.Number_Experiment_Fields})

{NumTrat: BrowseGallery1.Selected.Number_Experiment_Fields} - moves to second screen the amount of Treatments.

 

I got this by reading http://stackoverflow.com/questions/39232599/pass-a-value-to-another-screen

 

Second Screen in BrowseGallery2 - Items

If (NumTrat = 5, Fields_5, NumTrat = 6, Fields_6, NumTrat = 7, Fields_7)

Connecting to the correct database, related to the amount of treatments.

 

If(
	NumTrat = 5; "5 Treatments";
	NumTrat = 6; "6 Treatments";
	NumTrat = 7; "7 Treatments";
	NumTrat = 8; "8 Treatments";
	NumTrat = 9; "9 Treatments";
	NumTrat = 10; "10 Treatments";
	NumTrat = 11; "11 Treatments";
	NumTrat = 12; "12 Treatments";
	NumTrat = 13; "13 Treatments";
	NumTrat = 14; "14 Treatments";
	NumTrat = 15; "15 Treatments";
	NumTrat = 16; "16 Treatments";
	NumTrat = 17; "17 Treatments";
	NumTrat = 18; "18 Treatments";
	NumTrat = 19; "19 Treatments";
	NumTrat = 20; "20 Treatments";
)

In the Second Screen - IconNewItem, To add values, but opening the correct form, with the amount of fields required, previously passed.

If(
	NumTrat=5;NewForm(FormTrat5);;Navigate(Fields5;ScreenTransition.Cover);
	NumTrat=6;NewForm(FormTrat6);;Navigate(Fields6;ScreenTransition.Cover);
	NumTrat=7;NewForm(FormTrat7);;Navigate(Fields7;ScreenTransition.Cover);
	NumTrat=8;NewForm(FormTrat8);;Navigate(Fields8;ScreenTransition.Cover);
	NumTrat=9;NewForm(FormTrat9);;Navigate(Fields9;ScreenTransition.Cover);
	NumTrat=10;NewForm(FormTrat10);;Navigate(Fields10;ScreenTransition.Cover);
	NumTrat=11;NewForm(FormTrat11);;Navigate(Fields11;ScreenTransition.Cover);
	NumTrat=12;NewForm(FormTrat12);;Navigate(Fields12;ScreenTransition.Cover);
	NumTrat=13;NewForm(FormTrat13);;Navigate(Fields13;ScreenTransition.Cover);
	NumTrat=14;NewForm(FormTrat14);;Navigate(Fields14;ScreenTransition.Cover);
	NumTrat=15;NewForm(FormTrat15);;Navigate(Fields15;ScreenTransition.Cover);
	NumTrat=16;NewForm(FormTrat16);;Navigate(Fields16;ScreenTransition.Cover);
	NumTrat=17;NewForm(FormTrat17);;Navigate(Fields17;ScreenTransition.Cover);
	NumTrat=18;NewForm(FormTrat18);;Navigate(Fields18;ScreenTransition.Cover);
	NumTrat=19;NewForm(FormTrat19);;Navigate(Fields19;ScreenTransition.Cover);
	NumTrat=20;NewForm(FormTrat20);;Navigate(Fields20;ScreenTransition.Cover)
	)

These answers helped me.

http://stackoverflow.com/questions/37521245/navigate-to-a-screen-by-its-name-in-powerapps https://powerusers.microsoft.com/t5/PowerApps-Forum/Navigate-to-a-screen-by-it-s-name/m-p/2454#M1352

 

Only problem of this solution, and I have to create several screens and in each one place the respective form.

 

A screen (AllFields screen) with a unique form? Exchanging only the data source and showing the correct form fields, would it be possible?

 

In the DataSource of the Form put

If (NumTrat = 5, Fields_5, NumTrat = 6, Fields_6, NumTrat = 7, Fields_7)

But managed to control which fields appear or not, the order they appear?

 

Files of project.

https://1drv.ms/f/s!AijLzG3Pzbarq267wW4GHdhtqS4H

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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