web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Trying to chain statem...
Power Apps
Answered

Trying to chain statements but get "Missing operator"

(0) ShareShare
ReportReport
Posted on by 131

Hi I have the following code in "Items" of a Gallery

AddColumns(DateRange,"vis",Date>=(ThisItem.StartDate) && Date<=(ThisItem.DueDate));
AddColumns(IndexedPhases, "col",LookUp(IndexedPhases, Value=(ThisItem.Phase.Value),PhaseColor))

When each of these statements are by themselves the formula runs but I cannot get the ; operator to chain them. What and am I missing? 

Any help would be appreciated. Thanks!

Categories:
I have the same question (0)
  • FrostedFlake Profile Picture
    138 on at

    1. Please try to replace every with an

    2. Try to use && to chain statements instead of using ;

     

    The syntax of PowerApps is really weird somehow

  • simondpalmer Profile Picture
    131 on at

    That just creates alot more errors. Is it because I have a Boolean operation (&&) that is not enclosed in parenthesis? I tried that as well (as shown below).

    AddColumns(DateRange,"vis",(Date>=(ThisItem.StartDate) && Date<=(ThisItem.DueDate)));
    AddColumns(IndexedPhases, "col",LookUp(IndexedPhases, Value=(ThisItem.Phase.Value),PhaseColor))

    but I still cant get it to work.

    Is it because I am adding multiple columns to "Items" of a gallery? And I cant treat it as if I am adding columns to a Table? Or can I?

  • simondpalmer Profile Picture
    131 on at

    I am guessing the problem is I am "addingcolumns" from 2 separate Tables. The "DateRange" Table I need for visibility settings and the "IndexedPhases" is used for coloring buttons. I instead tried to add the color information for the "fill" settings like below

    LookUp(IndexedPhases, Value=(ThisItem.Phase.Value),PhaseColor)

    But that doesn't work. Any help would be awesome

  • FrostedFlake Profile Picture
    138 on at

    To chain multiple statements you have to do a double semicolon after a statement

     

    SubmitForm(SharePointForm1);;

     

  • Verified answer
    simondpalmer Profile Picture
    131 on at

    I worked it out. For a Galleries Items you can't add columns from two separate tables. So I made sure I had everything I needed was in ThisItem so after I retrieved everything I needed from the table (DateRange) I just went and referenced ThisItem to grab a value for a Color.

    AddColumns(DateRange,"vis",Date>=(ThisItem.StartDate) && Date<=(ThisItem.DueDate),"col",(ThisItem.Color))

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard