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 / TextInput in browsegal...
Power Apps
Unanswered

TextInput in browsegallery to display value from EditForm

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

Is there a way to display the value of datacardvalue1 in a text input that is displayed in browsegallery.

 

the idea would be that the user can edit this and submit it and make a change to the existing text, (if it existing text exists).

 

ive treid doing DataCardValue1 in the default property of the text input, however this displays the text from my one record in all my records in browsegallery. I need it to show the individual record text that could already exist.

 

thanks.

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @wonka1234 

    An EditForm only holds 1 record, whereas a gallery holds many records. This is why your TextInput shows the same value in all the TextInput fields in the gallery. You need a way to reference the one record you want to adjust.

     

    You could try this

    1. OnSelect of gallery item

    Set( vRecord, ThisItem)
    

    2. Set the Form Item to

    vRecord

    3. Default of the Text Input

    If( vRecord.ID = ThisItem.ID, DataCardValue1.Text, ThisItem.yourTextFieldName )

     

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @EddieE  thanks for this.

     

    I have this in my brwose gallery OnSelect -- 

    Set(
    gblRecordID,
    ThisItem.ID
    )

     

    I already have this in my OnSelect Gallery TEXT INPUT  --

     

    Set(gblRecordID ,ThisItem)

     

    and default of TEXT INPUT - 

    If( gblRecordID = ThisItem.ID, DataCardValue35_1.Text, "test")

     

     

    and I have this in the item in my Edit Form

     

    LookUp('Data Source',ID=gblRecordID)

     

     

    can you help me adjust this?

     

  • EddieE Profile Picture
    4,641 Moderator on at

    @wonka1234 

    I cannot see where the issue is with your code, can you share some screenshots of what is happening.

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @EddieE 

     

     

    BrowseGallery1 - OnSelect .. This one may not be needed? Let me know.. i think i mistakenly put this here..

     

    wonka1234_0-1693228295139.png

     

    TextInput on browsegallery... : OnSelect - Error -

     

    wonka1234_1-1693228582272.png

    TextInput on browsegallery : Default - Error

     

    wonka1234_2-1693228725385.png

    DataCardValue35_1 is the datacard for the comment I want to show (if it exists already)

     

     

    EditForm1_1 - Item Property

     

     

    wonka1234_4-1693228921826.png

     

     

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    ok getting closer.. upon further testing...

     

    Default of Text INput on my browse gallery...

     

    wonka1234_5-1693233292295.png

     

     

    now trying it like this - this only gets my latest access ID - 

     

     

    wonka1234_7-1693233407104.png

     

     

  • EddieE Profile Picture
    4,641 Moderator on at

    @wonka1234 

    You are mixing up the variable gblRecordID - making it a single field and also a FULL record - with you various OnSelect code. You need to choose one or the other.

     

    eg

     

    // Browse gallery OnSelect
    Set( gblRecordID, ThisItem.ID);
    
    // TextInput OnSelect
    Select(Parent);
    

     

     

    All your other code should work then.

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @EddieE  looks to be working but seems like the text only comes up when I click into the text input. Is there a way to just show it before clicking the input box?

  • EddieE Profile Picture
    4,641 Moderator on at

    @wonka1234 

    What is the Default of the TextInput control? It should be something like

     

    If( gblRecordID = ThisItem.ID, DataCardValue35_1.Text, ThisItem.Comment)
    
    // change .Comment to your field name

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @EddieE  i deleted teh box and reinserted.. I seem to be able to get all the values for each record doing this in default of the text input -

     

    If(IsBlank(ThisItem.'Field Comment'), "Write a comment after marking as complete.", ThisItem.'Field Comment')

     

    results look okay - 

     

    wonka1234_0-1693352862425.png

     

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