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.
Solved! Go to Solution.
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!
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.
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
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
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.
@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.
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!
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
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!
User | Count |
---|---|
26 | |
4 | |
4 | |
3 | |
2 |
User | Count |
---|---|
28 | |
10 | |
9 | |
9 | |
7 |