March 20, 20223 yr I have a portal which includes related data from 4 fields and I would like to filter records so that only those which include certain values will show. I have created a global field each of the fields with a drop-down list of values from each of the for fields in the portal however by default they are blank. I can filter for fields which meet any of the drop down values however I can't find a way to stop records with empty values in any of those fields whose dropdown remains empty being included. Also the default appearance is filtered such that records with any of those fields empty are included - I want all records to show by default. The portal filter currently looks like this where the globals are the filter selection fields and the Tasks are the fields in the related table I want to include: SubProfiles::g_FilterBodyPart = Tasks::BodyPart or SubProfiles::g_FilterLoad = Tasks::Load or SubProfiles::g_FilterPosture = Tasks::Posture or SubProfiles::g_FilterFrequency = Tasks::Frequency I'd appreciate any help in setting up the filter such that it shows all related records when the global fields are empty (i.e. default state) and does not include any records with any of the fields blank when filtered, only those which match the chosen value in the drop down from the globals. I hope that is enough information, thanks in anticipation. JobProfiles _filter_not_working.fmp12 Edited March 20, 20223 yr by muzz Attach file
March 20, 20223 yr If you want to disable the filter when the filtering field is empty, you can formulate the condition as: IsEmpty ( SubProfiles::g_FilterBodyPart ) or SubProfiles::g_FilterBodyPart = Tasks::BodyPart I am a little confused by your other requirements. Usually, when you have several filtering fields, you would want the conditions to be cumulative (i.e. combined using the AND operator), not alternative as shown in your question.
March 20, 20223 yr Author Thanks for your reply. Yes the idea is to refine the task list to those tasks that include any of the selections in any of the 4 categories mentioned, rather than only records that include all of the chosen values. I will try your recommendation above, however I'm not sure how to combine the requirements for all four fields - will they need to be expressed as: IsEmpty ( SubProfiles::g_FilterBodyPart ) or SubProfiles::g_FilterBodyPart = Tasks::BodyPart and IsEmpty ( SubProfiles::g_FilterLoad ) or SubProfiles::g_FilterLoad = Tasks::Load etc Thanks again.
March 20, 20223 yr 2 hours ago, muzz said: I'm not sure how to combine the requirements for all four fields I am not sure either - because I am still confused regarding what you want the resulting behavior to be. If you really want to "include any of the selections in any of the 4 categories", then you need to continue using the OR operator. But then you will not be "refining" the list by each added criterion; on the contrary, you will be expanding it.
March 20, 20223 yr Author Yes it is expanding at this stage. So a request may say "show me all the tasks that are performed in standing, but also show me all daily tasks irrespective of whether or not they are done in standing (but don't show me tasks that have an empty field in the Load and Frequency fields). Perhaps there is another method that works better? I may have to change from a drop down list to check boxes to allow multiple choices within fields so if there is a better way I may need to redesign. Thanks again.
March 21, 20223 yr OK, that's much clearer now. Except for the "don't show me tasks that have an empty field in the [other] fields" part. I presume that you do want to show ALL related records when all 4 filtering fields are empty? Or do you then want to exclude records that have an empty value in any one of the 4 fields? 3 hours ago, muzz said: Perhaps there is another method that works better? The alternative is to filter a relationship, not the portal. But I don't know if that would work better. Let's get the requirements completely clear first.
March 25, 20223 yr Author Thanks for that. I think I will talk a bit more to the person asking for it and narrow down the actual requirements and work from there.
Create an account or sign in to comment