cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AndersIskov
Level: Powered On

Parent.Default doesn't work like dropdown with boolean values (Toggle)?

Hi,

 

So I have added a toggle to determine whether a lead/opportunity is a realistic scenario "No"/"Yes", it works just fine and updates the maintable with either value as well. However, when I go to the editform (in case I want to change information regarding the item) it goes back to "No".

 

I tried Parent.Default, which works when I use dropdowns, but here it gives me the following error:

 

Parent.default.Error.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

I realize my error now.  Check out my change to the Default property below.  I think I got your column name right but please correct it if I made a spelling mistake.

 

Default: If(ThisItem.'Realistic Scenario'="Yes", True, False)
Update: If(Toggle3.Value,"Yes","No")

 

SharePoint is my default for these reasons:

 

SharePoint Excel
Can use delegation techniques to use datasets with greater than 2,000 rows 2,000 row hard limit when working with PowerApps
Built to handle multiple users at once without performance degradation Greater than 5 concurrent users will result in decreased performance
Sharing permissions can be controlled at a fine level: read-only, contribute, full access Sharing permissions can only be full read/write
SharePoint will continue to exist if the user leaves OneDrive might be removed if the user leaves
Access to the SharePoint lists can be controlled centrally by an administrator Access to an Excel file in a OneDrive could be shared to anyone (even outside the organization) without administrator knowledge
No additional cost.  Does not require a PowerApps premium license. No additional cost.  Does not require a PowerApps premium license.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

9 REPLIES 9
Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

Can you please show the code used within the Default property of the DataCard for Realistic Scenario?  Screenshot would be great.

 

Also, can you use App Checker to determine which property is throwing the error?

AndersIskov
Level: Powered On

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@mdevaney, Hi

 

This is the default of the Realistic Scenario:

 

RealisticScenario.JPG

 

 

 

 

 

 

 

 

 

Is this the App Checker you are refering to?:

 

 

AppChecker.JPG

Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

Excellent screenshots!  Thanks for putting them together 🙂

 

The Update property of the DataCard is likely the issue here.  It is saving values as a Boolean rather than Text.

If(Toggle3.Value,"Yes","No")

 

If you are using a SharePoint Yes/No column to store this data your Update property should be

Toggle3.Value

 

Or if you are using a SharePoint text column to store this data you should use the following DataCard properties.

Default: If(Toggle3.Value="Yes", True, False)
Update: If(Toggle3.Value,"Yes","No")

 

Please let me know which is the case.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

AndersIskov
Level: Powered On

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

I am unfortunately not using a SharePoint list. All the data is stored in my "MainTable" Excel Sheet in a textbox.

 

I tried to set the properties you suggested but am still getting errors 😞

 

It says I need to "convert the value to be the same type,..." - I guess because one is text and the other is boolean?:

 

AppChecker2.JPG

 

 

I should mention it is in fact updating my MainTable with "Yes" or "No" right now. My problem is that we will be updating information often and whenever editform is opened the default of the Toggle3 is "No", so if someone does not realise and forgets to toggle it on again it will skew the data.

Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

I did not expect Excel but that's OK.  Did you happen to try this already?  If you did I would like to know what happened and if any errors were received

Default: If(Toggle3.Value="Yes", True, False)
Update: If(Toggle3.Value,"Yes","No")

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

AndersIskov
Level: Powered On

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

Yes I tried updating in the Default and Update property with those and it still gives me the yellow Warning as seen below:

 

AppChecker3.JPGAppChecker4.JPG

 

 

Would you generally not advice using Excel as compared to SharePoint? It seems to be more common with SharePoint, but I am working on an Application that will allow us to edit and access an already existing Spreadsheet from Excel.

Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

I realize my error now.  Check out my change to the Default property below.  I think I got your column name right but please correct it if I made a spelling mistake.

 

Default: If(ThisItem.'Realistic Scenario'="Yes", True, False)
Update: If(Toggle3.Value,"Yes","No")

 

SharePoint is my default for these reasons:

 

SharePoint Excel
Can use delegation techniques to use datasets with greater than 2,000 rows 2,000 row hard limit when working with PowerApps
Built to handle multiple users at once without performance degradation Greater than 5 concurrent users will result in decreased performance
Sharing permissions can be controlled at a fine level: read-only, contribute, full access Sharing permissions can only be full read/write
SharePoint will continue to exist if the user leaves OneDrive might be removed if the user leaves
Access to the SharePoint lists can be controlled centrally by an administrator Access to an Excel file in a OneDrive could be shared to anyone (even outside the organization) without administrator knowledge
No additional cost.  Does not require a PowerApps premium license. No additional cost.  Does not require a PowerApps premium license.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

AndersIskov
Level: Powered On

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

And of course it works, thank you very much!

 

Regarding the SharePoint vs. Excel, those are some very valid arguments I will have to consider.

Super User
Super User

Re: Parent.Default doesn't work like dropdown with boolean values (Toggle)?

@AndersIskov 

You are very welcome.  If I answered your question please make sure to Accept as Solution.

 

SharePoint takes awhile to learn but every moment spent is worth it in my opinion.  Its a highly valuable skill to have in your "toolkit" and on your resume.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,627)