Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Build Contact details update app

(2) ShareShare
ReportReport
Posted on by 14

Hi, 

In my canvas app, I have three Forms. The first two are FormViewer, which display Customer Master and Temporary Customer table. The third Form is an Edit Form, the field will check if the first two FormViewer field is the same, if yes, display the value and not allow to change, if no, empty the input box and ask the user to fill in the correct value.

I would like to ask how to do that?

I have tired to use some like:

If( FormViewer1.Item.'Customer Number' = FormViewer2.Item.'Customer No', DisplayMode.View, Displaymode.Edit)

But I cannot get the value from the FormViewer.

I would like to ask how to get the value from item inside a FormViewer to do comparison>

Thank you very much in advance.

Henry 

Categories:
  • henrychoiyw Profile Picture
    14 on at
    Re: Build Contact details update app

    Hi @SunilPashikanti ,

    Thank you very much for your reply.

    I tried your method, however, I cannot select FormViewer1.Item in Item property.

    I sort of found a solution on this is to name the actual field inside the FormViewer1 and just target that item to compare, it seems work but it's not the best way to get this done.

    Henry

  • SunilPashikanti Profile Picture
    731 Super User 2025 Season 1 on at
    Re: Build Contact details update app

    Hi @henrychoiyw

     

    Let’s address how to get the value from an item inside a FormViewer in Power Apps and perform the desired comparison.

     

    Accessing FormViewer Values:
    To retrieve the value from a FormViewer, you need to reference the Item property of the FormViewer control.
    For example, if you have a FormViewer named FormViewer1, you can access the value of a specific field (e.g., ‘Customer Number’) using FormViewer1.Item.'Customer Number'.


    Comparison Logic:
    In your case, you want to compare the ‘Customer Number’ field between two FormViewers (FormViewer1 and FormViewer2).
    If they match, set the Edit Form’s display mode to View (read-only). Otherwise, allow editing (display mode: Edit).


    Formula Adjustment:
    The formula you provided is almost correct. However, you need to ensure that the Item property references the correct FormViewer.
    Modify your formula as follows:

    If(
     FormViewer1.Item.'Customer Number' = FormViewer2.Item.'Customer No',
     DisplayMode.View,
     DisplayMode.Edit
    )

    Additional Considerations:
    Make sure that the field names (‘Customer Number’ and ‘Customer No’) match exactly as they appear in your data source.
    Verify that the FormViewer controls are correctly connected to the relevant data sources (Customer Master and Temporary Customer tables).


    Apply this adjusted formula to your Edit Form’s DisplayMode property, and it should work as expected.

     

    Solved: Formviewer Get the right data. - Power Platform Community (microsoft.com)

    Solved: Display Form Control Getting Your Data - Power Platform Community (microsoft.com)

     

    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.

    Sunil Pashikanti - Tech Blog: PowerApps

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard