cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shradds
Helper I
Helper I

Navigate to different screen on dropdown selection

Hi Team, 

 

I am new to PowerApps and trying my hand at a pricing form, which has 2 dropdowns (exclusive) to select from. One gives a partner option while the other gives the type of item to list the pricing. These 2 are independent dropdowns and i want to make them both mandatory. On selecting the partner and then the item, i want the screen the update the pricing based on the item selected OR to navigate to other screen where i can show the pricing for that particular item.

I tried using If and Navigate function here, which didn't work.

If(SIpartner.Selected.Value= GSS,"(Navigate(GSS,ScreenTransition.Cover)")) Here GSS is my partner option and Uipath my item.

 

Shradds_0-1594056339254.png

Also, i do not want attended BOT field to take negative values. At present the fields are taking some values from Sharepoint list for calculations. Even these dropdowns are picked up from a sharepoint list.

 

Would appreciate some help in Navigation error.

 

Thanks.

5 REPLIES 5
Drrickryp
Super User
Super User

Hi @Shradds 

The Navigate() function requires an action to trigger it, meaning it has to be in the OnSelect property of a button or icon or the OnChange property of a dropdown or combobox.  Personally, I prefer not to use the OnChange property of those controls because it doesn't allow the user to reconsider and the action will be taken immediately.  I would use a button instead but that's me.  

In any event, the syntax of your formula is flawed.  I would put the formula in the OnChange property of the dropdown as follows:

 

If(
    SIpartner.Selected.Value = "GSS",
    Navigate(
        [@GSS],
        ScreenTransition.Cover
    )
)

 

From your formula it appears that the screen you are navigating to is also the same as the selection in your dropdown.  You should probably change the name of the screen to something like scrGSS to avoid a disambiguation problem.  Also make sure the Default for the dropdown is something other than "GSS" so that the Navigation is triggered by the change.

v-qiaqi-msft
Community Support
Community Support

Hi@Shradds,

Based on the issue that you mentioned, could you please share more about your scenario?

More details about AttebdedBOT will be appreciated.

Combine that with the formula you provided, I have a test on my side which goes well.

 

If(DataCardValue6.Selected.Value="GSS",Navigate(Screen1,ScreenTransition.Cover))

 

Note: "GSS" is a quoted value that needs "" double quote. Navigate() is a single function, you don't need brackets.

Please modify the formula as below.

 

If(SIpartner.Selected.Value= "GSS",Navigate(ItemPricingScreen,ScreenTransition.Cover))

 

Further, do you want to make both dropdowns mandatory? If so, you can set the Required property of the corresponding Data card as "true".

0707.png

What's more, you don't want AttebdedBOT to take negative values, please set the Default/Text property of the corresponding Label or TextInput as below.

I assume that AttendedBOT is a Number column.

 

If(ThisItem.AttendedBOT<0,ThisItem.AttendedBOT*-1,ThisItem.AttendedBOT)

 

Best Regards,

Qi

Best Regards,
Qi

Thank you @Drrickryp . I used the formula i mentioned on the "Onchange" action itself for the dropdown. And i totally agree to your point that the dropdown selection immediately redirects to the next page without allowing any time for the user. 

In my case, every partner selection has different pricing as well as every item selection. How do i vary screens on the submit button for every selection. Also, if i need to add all formulas into one result screen itself, how it is possible? I have explained the scenario in the below message.

 

Can you please help.

Thanks @v-qiaqi-msft  for the quick response.

 

To set the field as mandatory, do i need set the dropdown "on select" to true? also, tried the function you suggested to discard negative items, doesn't work for me. It still accepts negatives.

My scenario here is a pricing sheet for number of BOTs bifurcated as attended and unattended. Based on the type of BOT eg. Uipath, Automation anywhere etc and the partners providing it GSS, Softomotive etc. I need users to select these 2 options (mandatory) and then fill up the form for their requirements and submit. The pricing for each unattended as well as attended is different based on the level of complexity (Low, medium, high) As @Drrickryp suggested redirecting immediately to the next screen wouldn't help, but that was what i could achieve being new to PowerApps. 

 

Ideally on filling up the form and clicking submit, the result screen should show pricing depending on both: Type of BOT and the Partner selected. How can that be achieved into one result screen, how would the text fields be?

At present i am taking the license and infra cost from my sharepoint list and hardcoded the complexities (Low, Medium, High) pricing using this formula for total of Attended and Unattended BOT. I am looking to pick every value from Sharpoint itself, even the complexities. Can you suggest if i pick up dropdown values as well from sharepoint or manual text would be preferable in this case.

(UL*2257)+(UM*6448)+(UH*12896)+Value(LookUp('Ui Pricing',Ui="Infra",Cost)*UB)

 

Shradds_0-1594116662640.png

 

Also, for the partner dropdown, i am directly mentioning the text that is to be reflected as default into the default option in properties, but yet it shows the first item from the dropdown, why is it so.

 

Appreciate your help. Thanks in advance. 

 

Thanks @v-qiaqi-msft  for the quick response.

 

To set the field as mandatory, do i need set the dropdown "on select" to true? also, tried the function you suggested to discard negative items, doesn't work for me. It still accepts negatives.

My scenario here is a pricing sheet for number of BOTs bifurcated as attended and unattended. Based on the type of BOT eg. Uipath, Automation anywhere etc and the partners providing it GSS, Softomotive etc. I need users to select these 2 options (mandatory) and then fill up the form for their requirements and submit. The pricing for each unattended as well as attended is different based on the level of complexity (Low, medium, high) As @Drrickryp suggested redirecting immediately to the next screen wouldn't help, but that was what i could achieve being new to PowerApps. 

 

Ideally on filling up the form and clicking submit, the result screen should show pricing depending on both: Type of BOT and the Partner selected. How can that be achieved into one result screen, how would the text fields be?

At present i am taking the license and infra cost from my sharepoint list and hardcoded the complexities (Low, Medium, High) pricing using this formula for total of Attended and Unattended BOT. I am looking to pick every value from Sharpoint itself, even the complexities. Can you suggest if i pick up dropdown values as well from sharepoint or manual text would be preferable in this case.

(UL*2257)+(UM*6448)+(UH*12896)+Value(LookUp('Ui Pricing',Ui="Infra",Cost)*UB)

 

Shradds_0-1594116662640.png

 

Also, for the partner dropdown, i am directly mentioning the text that is to be reflected as default into the default option in properties, but yet it shows the first item from the dropdown, why is it so.

 

Appreciate your help. Thanks in advance. 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,995)