cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
barlowse
Advocate IV
Advocate IV

Sharepoint customized form not showing expected default of variable.

 

I have a form for a sharepoint list that I am customizing in Powerapps.
I have added a datasource for another list called "Label Translations" which holds an English and Spanish text for each label in the form.
OnApp start and OnVisible of my form  I set a variable - Set(_language,"English") 

On the form I have added a dropdown box with 2 values for the items property ["English","Spanish"] and then I set the default for the dropdown to my variable _language.
I have a label on my form to show the variable _language and it does display "English".


Then in each of my labels for all the fields I have this formula If(_language="English",Parent.DisplayName,LookUp('Label Translations',Title="Label4").SpanishText)
However, when the form loads after clicking the New button on my sharepoint list, the form always loads the spanish text for the labels instead of the English which is desired.

Changing the dropdown selected value does switch the language.
However, the desired functionality is to default to English and always make the user choose to show in Spanish.
Do you think this is a bug or am I approaching this the wrong way?

1 ACCEPTED SOLUTION

Accepted Solutions

So, I fixed my form but would still like to know if there is something I need to be aware of in the future. So if anyone has any idea please let me know.
I adjusted this formula

If(_language="English",Parent.DisplayName,LookUp('Label Translations',Title="Label4").SpanishText) 

on all my labels to be this instead 
If(_language<>"Spanish",Parent.DisplayName,LookUp('Label Translations',Title="Label4").SpanishText)

View solution in original post

2 REPLIES 2
barlowse
Advocate IV
Advocate IV

Oh and another thing, when in the editor and playing the app it works fine, its just after its published to Sharepoint that it goes wrong.

So, I fixed my form but would still like to know if there is something I need to be aware of in the future. So if anyone has any idea please let me know.
I adjusted this formula

If(_language="English",Parent.DisplayName,LookUp('Label Translations',Title="Label4").SpanishText) 

on all my labels to be this instead 
If(_language<>"Spanish",Parent.DisplayName,LookUp('Label Translations',Title="Label4").SpanishText)

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,402)