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 / Set the value of looku...
Power Apps
Answered

Set the value of lookup field to other single line of text field

(0) ShareShare
ReportReport
Posted on by 43

Hi

In my table (dataverse) I have a lookup field and I would like to set a business rule to set the value of other field(single line of text) to the value of lookup field selected.

I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @Hetvik,

     

    Unfortunately this is not possible using a business rule because the data types do not match up (you can set a text field using another text field value, etc.). If you need to see the text value set immediately upon setting the lookup in the user interface, then you will need to use JavaScript to achieve this. If it doesn't need to be immediately but can be on save, then you can use a classic Dataverse synchronous workflow to achieve this.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Hetvik,

    This is not possible with a business rule in Power Apps. 

    Some options:

    1.  Custom JavaScript or Plugin

    2.  Power Automate flow - Although this would be asychronous...

     

    Hope this helps.  Please mark accepted or Like if provides some value.

     

    Thanks,


    Drew

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @ChrisPiasecki,

     

    I was replying about the same time as you and testing out the real-time workflow.  I was not able to accomplish this with a real-time classic workflow, were you able to make this work?

     

    Thanks,

    Drew 

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @dpoggemann,

     

    You're right in that the workflow will only get the lookup fields primary field text, not the GUID of the record.

    A custom workflow activity, plugin, or Power Automate Flow are options in addition to JavaScript as mentioned.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Fubar Profile Picture
    8,379 Super User 2025 Season 2 on at

    @ChrisPiaseckithink all that is being asked by the original poste is for it to copy the 'name' from the Lookup to a Text field and not the guid or other fields off the lookup record - and as such Real-time workflow is probably the way to go. 

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    @Fubar yes my original response was based on that assumption as well but after re-reading the original post I feel it could be interpreted as the value (guid) of the Lookup too. We'll see what @Hetvik responds back with. 

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @Hetvik,

    Not sure if this is resolved yet, but another option is with calculated columns/fields which would also avoid customizations with code (e,g. JavaScript) if you need real-time/sync. 

    Cheers!

  • Bruno Oliveira Profile Picture
    23 on at

    Hi @EricRegnier ,
    I tried with calculated columns, they work. However, the text field is only updated when I save the form. I wanted the field to be immediately updated, as soon as I change the lookup value. A part the option of auto saving the form in JS, can we do anything else?

    Many thanks

    Bruno

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @brunex01, for calculated columns, unfortunately it would only only after saved because calculated columns are caclulated ar runtime when the record is retrieved (values are not stored in the database). JS would be your only option for now with an onchange handler. Maybe eventually when PowerFX calculated columns are released it may be possible, but something to try out them.

    Hope this helps!

  • Bruno Oliveira Profile Picture
    23 on at

    Thanks @EricRegnier . I appreciate your answer.

    Cheers

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard