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 / Assign a value to a Da...
Power Apps
Answered

Assign a value to a DataCardValue Field

(0) ShareShare
ReportReport
Posted on by 12

Hi there,

I tried to assign a value to a DataCardValue (binded DataCard in a Form). This field is a primary Index (connected to another table), but user should not add it manually when the form generates a new(Form1).

 

I really do not know how to do. my try was like this:

 

New(Form1);

DataCardValueXX = var_primekey

 

But I cannot assign the value. No idea why. 

 

Please help 🙂 Thank you so much,

Klaus

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Try this: DataCardValueXX.Text = var_primekey

    Or, write on the default property of that datacard the variable

     

    Think it will work and, instead of making a new form, just reset it.

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

  • KI-13090739-0 Profile Picture
    12 on at

    This does not work. 

  • zmorek Profile Picture
    3,272 on at

    Does the column type of the data source match the value you're attempting to assign it?

  • Verified answer
    KI-13090739-0 Profile Picture
    12 on at

    yes, it matches. I made a workaround now.

    Solution is: ulock the DataCardValue and set defaut to 

    If(Form1.Mode=1;glbProject.ProjectNo;Parent.Default)
     
    glbProject.ProjectNo is a Variable with the prime_key

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 875

#2
Valantis Profile Picture

Valantis 530

#3
11manish Profile Picture

11manish 432

Last 30 days Overall leaderboard