Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

match between a Gallery and a Table

(0) ShareShare
ReportReport
Posted on by 180

Hello guys

I'm trying to get a match between a Gallery and a Table with the LookUp function.
I get an error message "Invalid formula. A value compatible with "DataSource" was expected. "
It seems this is not possible... but I think there is maybe another way to achieve this? Or am I doing something wrong?

What I try to achieve:
In PowerApps I can select an "Order" from a Gallery which is connected with a SP List.

on the new page--> (Please see screenshot for more understanding) I can edit the form

Unbihexium_0-1625478797213.png

 


FormA (Flugbuchungen_Formular) --> Editable text fields and selectable values and an unique ID number --> SP List
FormB (Form4) --> not editable/visible fields which copies the values/texts from FormA (actually 1:1 the same informations) --> Excel file

When I hit the "save" button --> it submits the Forms --> Form1 to a SP List // --> Form2 to a Excel list (OneDrive)
((the save button does the following;
SubmitForm(Flugbuchungen_Formular);; SubmitForm(Form4);; Navigate(Hauptseite;ScreenTransition.Fade)))
which works... for new entries

if I want to edit an existing Table entry I need to declair (at the item field) which object or row have to be modified... and there is my problem:
with this I get the following error: "Invalid formula. A value compatible with "DataSource" was expected. "

If(Form4.Mode = FormMode.Edit;
LookUp(
Tabelle5.'Antrag ID'; Gallery2.Selected.'Antrag ID' = Tabelle5.'Antrag ID'
).'Antrag ID'
)

or error message "Some types are incompatible for comparison. These types cannot be compared"

If(Form4.Mode = FormMode.Edit;
LookUp(
Tabelle5.'Antrag ID'; Gallery2.Selected.'Antrag ID' = Tabelle5.'Antrag ID'
)
)

Is there another way?

Thank you in advance

 

Categories:
  • Unbihexium Profile Picture
    180 on at
    Re: match between a Gallery and a Table

    Hi WarrenBelz

    Thank you so much! It works just perfect! 

    If(
     Form4.Mode = FormMode.Edit;
     LookUp(
     Tabelle5;
     'Antrag ID' = Gallery2.Selected.'Antrag ID'
     )
    )

     
    Have a good day!
    best regards!

  • Verified answer
    WarrenBelz Profile Picture
    146,635 Most Valuable Professional on at
    Re: match between a Gallery and a Table

    @Unbihexium ,

    Where do you have this formula - it will produce a single (numeric) value, so it needs to be a Label Text or a control Default.

    If that is a Form Item, you need to drop the .ID off the end of the first structure I sent (and produce a Record).

     

    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.

  • Unbihexium Profile Picture
    180 on at
    Re: match between a Gallery and a Table

    Hi WarrenBelz

    Thank you for your reply.

    Unfortunately I get the same error with this syntax.  ("Invalid formula. A value compatible with "DataSource" was expected. ") 

    Unbihexium_0-1625485815205.png

    Unbihexium_1-1625488718728.png

     

     best regards

  • WarrenBelz Profile Picture
    146,635 Most Valuable Professional on at
    Re: match between a Gallery and a Table

    Hi @Unbihexium ,

    The correct syntax is 

    If(
     Form4.Mode = FormMode.Edit;
     LookUp(
     Tabelle5;
     'Antrag ID' = Gallery2.Selected.'Antrag ID'
     ).'Antrag ID'
    )

    however you are going in a bit of a circle here - you just need

    If(
     Form4.Mode = FormMode.Edit;
     Gallery2.Selected.'Antrag ID'
    )

     

    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.

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard