Hey guys, I'm having real problems with understanding if/switch/multiple if statements 😂
I'm trying to set up a label text so that depending on whether certain quoted words are in a field, it shows the relevant text. My If statement below has been taken but only shows the first one.
If("Analytical Chemistry" in Gallery2.Selected.LabsChosen,"Analytical Chemistry: "&Char(10)&Gallery2.Selected.'Ana-Fulfilment'&Char(10)&Char(10),
("Biochemistry" in Gallery2.Selected.LabsChosen),"Biochemistry: "&Char(10)&Gallery2.Selected.'Biochem-Fulfilment'&Char(10)&Char(10),
("Cell Biology" in Gallery2.Selected.LabsChosen),"Cell Biology: "&Char(10)&Gallery2.Selected.'CB-Fulfilment'&Char(10)&Char(10),
("Microbiology" in Gallery2.Selected.LabsChosen),"Microbiology: "&Char(10)&Gallery2.Selected.'Microb-Fulfilment'&Char(10)&Char(10),
("Molecular Biology" in Gallery2.Selected.LabsChosen),"Molecular Biology: "&Char(10)&Gallery2.Selected.'Molecb-Fulfilment'&Char(10)&Char(10),
("Preparative Chemistry" in Gallery2.Selected.LabsChosen),"Preparative Chemistry: "&Char(10)&Gallery2.Selected.'PrepChem-Fulfilment',
IsBlank(Gallery2.Selected.LabsChosen),"")
Hey Warren, possibly some wires crossed, been trying to work the function code you gave then realised selecteditems 🙂 It's a single item selection from the gallery, I'm trying to get it to look at the specific strings of words within a single field and if they're there, to display certain text within the label, and if not , not to display the text. There are 6 strings in total I am trying to get it to acknowledge.
HI @Lauren_ ,
Back to basics again - if it is a single value selected, why do you need the two hard returns? Also your initial posted code seems fairly close to the solution except you need
If(
Gallery2.Selected.xxxx = "Analytical Chemistry",
LookUp(
. . . . . .
and Or() || between the arguments instead of And() &&
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
181 | |
52 | |
41 | |
40 | |
34 |
User | Count |
---|---|
262 | |
81 | |
71 | |
69 | |
66 |