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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / match between a Galler...
Power Apps
Unanswered

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:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    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.

     

  • Unbihexium Profile Picture
    180 on at

    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

  • Verified answer
    WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    @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

    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!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard