Is there by chance a Contains or SubString function? Since I believe Office365.MyProfile() doesn't display if the current user is a Vendor or FTE, I was wondering if PowerApps has a way to determine if the Office365.MyProfile().Email or User().Email has the "v-" substring to determine whether or not they are a Vendor or FTE?
Hi @rgruian ,
Thanks for this. Is there a way to write multiple values with the 'in operator:
For Example: "A", "B", "C" in datacard.
I found that I needed to write it like this for it to work:
"A" in datacard || "B" in datacard || "C" in datacard.
Thank you.
Regards,
Daniel
The formula you pointed out seems syntactically incorrect. Just a quick reminder, PowerApps has a functional language, whereby each element declares where it draws its value(s) from; as opposed to an imperative language whereby each element would push value(s) into other relevant elements. This is similar to what happens in Excel: each cell declares where it draws its value(s) from, and how those values are composed to form the final value flowing into the cell.
Back to your example, it sounds like what you need is to populate the dropdown with a one-column table that contains two values: "Vendor", and "FTE".
- If you are using a Form, try changing the type of your field to "Choice" in Sharepoint, and specify what the choices are. PowerApps should pick up this metadata automatically, and the FTE/Vendor choices will show up in the resulting form / dropdown.
- If you are not using a Form but instead building a custom experience, then simply bind the dropdown to an inlined one-column table, like this:
dropdown.Items = ["FTE", "Vendor"]
So the scenario is we're pulling in a list from sharepoint and we want to automate the population of this dropdown field if possible where the options are "FTE" or "Vendor"
What we have is...
If("v-" in Office365Users.MyProfile().Email, DataCardValue.Items. = EmployeeType.Value = "Vendor", DataCardValue.Items. = EmployeeType.Value = "Vendor")
DataCardValue is our dropdown
EmployeeType is our tabular data source I guess
The condition I believe is correct the last two parts don't seem to work still based on your feedback
How can we switch the drop down to one of the tabular data sources, "FTE" or "Vendor"?
What are you binding your dropdown to?
Dropdowns, like listboxes and galleries, are typically bound to tabular data sources (tables), with one or more columns. The shell will make it possible for you to specify which of the columns/fields will be rendered in the dropdown. However, selecting one item will select the entire corresponding row of input.
For example, assuming that you have a data source Employees with the following fields: Name, Category, Title.
dropdown.Items = Employees
Value = Name
The specifics of "Vendor" vs "FTE" will be part of your tabular data, and will show up in the dropdown automatically.
If on the other hand you just want to show a simple dropdown that lets you select between two options "Vendor" vs "FTE", do this instead:
dropdown.Items = ["Vendor", "FTE"]
It all depends on what your scenario calls for.
Thanks for your response.
Now im running into the issue of trying to change the value of a drop down from an if statement using this logic.
If( "v-" in yourTextValue, "Vendor", FTE)
Power apps is complaining about expecting record values. How do I pull the record value from my dropdown?
There are several ways to accomplish this, the easiest of which is to use the "in" operator:
"v-" in yourTextValue
You can also use the Find function:
Find(find_text, within_text, optional start_index)
Yet another way to do it is to use the Left function:
Left(yourTextValue, 2) = "v-"
WarrenBelz
44
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36