cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dihelp
Frequent Visitor

How to set Default Values for a Dropdown List that references a value outside of the dropdown list options?

Hi, 

I'm a new user to Power Apps in the process of building a inventory management system. I apologize in advance due to my poor issue explanation.

 

I'm currently building the new form submission screen which includes populating a sharepoint list with a ID # that corresponds to a Ebay Store Category from a drop down list that the user would select.

Data Source:

dihelp_0-1638246104424.png

 

I've accomplished the part of populating the sharepoint list with the ID # based on the users selection of the Store Category by using this update function: StoreCat.Selected.'ID Number'

dihelp_2-1638246702212.png

 

 

However, the issue I'm having is when I go back to edit this item the default will not save if I were to use the following Default Setting: ThisItem.ebaystoreid because this store id submitted is a number format but the options from the dropdown are text causing a error when the dropdown list tries to identify which ebaystoreid ID # corresponds with the desired text to display based on prior submission. I attempted to add a Lookup function to the Default setting: LookUp(StoreCategory,ThisItem.ebaystoreid.Value = 'ID Number',StoreCategory) but get the below errors. 

dihelp_1-1638246665277.png

 

Temporary Workaround: As a temporary fix (Seems to be excessive)  I created a hidden Store Category Name Sharepoint Column and added it as a field to  the form. This value references the users selection, saves it as text, and then is used as the default for the ebay store category. 

 

dihelp_3-1638246939840.png

 

 

Is there a simpler workaround? 

 

Thank you in advance for the help.

 

Best,

John in need of (Dihelp)

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
CNT
Super User
Super User

@dihelp 

Please try the following,

Text(ThisItem.ebaystoreid)

View solution in original post

@dihelp 

Please try the following,

LookUp(StoreCategory, Value('ID Number')=Value(Parent.Default)).'Store Category'

View solution in original post

13 REPLIES 13
CNT
Super User
Super User

@dihelp 

Please try the following,

Text(ThisItem.ebaystoreid)

dihelp
Frequent Visitor

Thank you sooo much! I can't believe it was such a simple fix. 

 

Could you please explain the science behind it, Is it just looking at the numeric column values and matching it to a text value from the datasource? 

dihelp
Frequent Visitor

I spoke too soon, unfortunately it preserves the prior submission only on some occasions when I go back to view the same item from the gallery. 

 

I've updated both the ebaystoreid datacard and StoreCat dropdown list default value to Text(ThisItem.ebaystoreid).

 

dihelp_0-1638284228978.png

 

@dihelp What do you have in the Items property of the dropdown?

dihelp
Frequent Visitor

I'd like the dropdown to allow the user to select a category and have the update value populate the corresponding 'ID Number' to the sharepoint list. This is the datasource below, table name is StoreCategory.

 

dihelp_2-1638301483993.png

 

 

Items: StoreCategory.'Source Category' 

dihelp_1-1638301222630.png

 

@dihelp The Default property should be,

LookUp(StoreCategory, 'ID Number'=Parent.Default).'Store Category'
dihelp
Frequent Visitor

I think we are getting closer, says incompatible data types.

dihelp_0-1638302617894.png

 

@dihelp 

Please try the following,

LookUp(StoreCategory, Value('ID Number')=Value(Parent.Default)).'Store Category'
dihelp
Frequent Visitor

Now delegation warning. Do you think there is any alternative way of accomplishing this?

dihelp_0-1638303171729.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,809)