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

ComboBox Choices with Variables

Hi

 

I am currently developing an app that our company will use for internal recruitment vacancy submissions. My form for the submission has a combobox used to select which of our site's that the ad will be registered for. I want to add a variable to the combobox that says not to include any of our site's that are closed.

 

I have got 2 sharepoint lists linked as data sources, "Recruitment" has the site detail on in it's name form and the other "BUMaster" has the site ID code, this second list also stores the closed date data.

 

This is my formula for the combobox currently: Items = Filter(Choices(Recruitment.'Site Name'), Value)

 

I assume there will be need for an If function here but I am new to PowerApps and could do with some help 🙂

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @THowkins96,

Since the "BUMaster" has the site ID code, could you please tell me that how you relate the "Recruitment" to "BUMaster", using the site ID code?

 

The key to this issue is the sharing key between "BUMaster" and "Recruitment", if the site ID code is the sharing key, we just need to retrieve the closed site based on it and exclude them from the 'Site Name' in "Recruitment":

ForAll(Filter(Recruitment,SiteID in Filter(BUMaster,Status="Closed").SiteID).SiteName,SiteName)

Note that I assume that you have a Status column to save the closed sites.

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @THowkins96,

Since the "BUMaster" has the site ID code, could you please tell me that how you relate the "Recruitment" to "BUMaster", using the site ID code?

 

The key to this issue is the sharing key between "BUMaster" and "Recruitment", if the site ID code is the sharing key, we just need to retrieve the closed site based on it and exclude them from the 'Site Name' in "Recruitment":

ForAll(Filter(Recruitment,SiteID in Filter(BUMaster,Status="Closed").SiteID).SiteName,SiteName)

Note that I assume that you have a Status column to save the closed sites.

Best Regards,
Qi

Hi Qi,

 

Thank you for your assistance, I was able to work this around by creating a collection that rids the data of closed units and therefore the combobox automatically took them out.

 

Thank you for your response though it is much appreciated.


KR
Tom

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,109)