0

I am creating an application with connection to two sharepoint list. Here what the table look like

**EmailManager**
ID  EmailTemplate         EmailTemplateID   Send       From....
1   orientationTemplate   1                 2022-16-03
**EmailTemplate**
ID  Title                 HtmlBody    Approved
1   orientationTemplate   ...         true

Has you may notice EmailManager.EmplateTemplate refer to the title and EmailManager.EmailTemplateID refer to the id and its a lookup form. The issue that I have is I would like in powerapps the field called Email Template that would show me a dropdown of all the email template, with a filtering. The filtering is select all EmailTemplate with Approved= true.

This is what I have and its not quite right, this is build using a edit form

Original Choices([@EmailManager].EmailTemplate)

MyFormulas Filter(Choices([@EmailManager].EmailTemplate),ThisItem.Approved=true)

Now i am fairly new to powerapps, but i am not sure if its the right approach( i have seen some option where you build a collection of your options, but this seem hard for no reason)

PS: to be fair i am bit confused has to why would it point EmailManager and not EmailTemplate Filter(Choices([@EmailTemplate].Title),ThisItem.Approved=true) something like this would make more sense to me.

1 Answer 1

0

Sometimes it's easier to just have 2 lists that are not linked as lookup columns. I'd remove them personally and use it as follows. You can filter lists with the Filter options. If you use it for drop down then you would want to do something like in the items property:

If your status field is a choice column in sharepoint:

Filter(EmailTemplate, Status.value = true)

If text field:

Filter(EmailTemplate, Status = "true")

Then use ID for the value option.

Create a text field in the form for EmailManager and set the default value of the EmailTemplateID textfield to DropDownBox.Selected.ID or DropDownBox.Selected.Value.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.