Define the field type for an initially blank column in a collection

This is for a Canvas App in PowerApps for Teams

I am working on a screen where the user:

  1. Pastes a text string (sample paragraph from a report) into a box and adds line breaks so that each line is either static text to keep, or a string to replace with a looked-up value.
  2. A button press splits the text and collects it into a collection where each record is numbered and contains the text from one of the lines. Fields in this collection are Sequence, Text, LookedUpRecord (default blank/null), and UseLookup (default False)
  3. (currently stuck on this step) In a gallery displaying these records, user can select a lookup value from a dropdown inside the gallery template which points to a dataverse table. The dropdown's OnChange property changes the records UseLookup value to True, and sets the LookedUpRecord to the dropdown record.
  4. These records will be written to a TextFragments Dataverse table and can be Concat-ed together to form a sentence like "{static text} {looked-up text} {static text} {looked-up text} {static text}", where the looked-up values would point to a project data point.

At least that is the idea. When I create the collection in step number 2, the LookedUpRecord value needs to be blank, but I cannot figure out how to define a collection field as a record or even a GUID if it has to start out blank. PowerApps seems to assume that it will be text, and the Patch function is unable to assign a lookup to it. I've tried {LookedUpField: Blank()} and {LookedUpField:""}

I think if I go ahead and write the TextFragment records to the dataverse table (instead of the temporary collection) in step 2, then the problem would clear up, but I would like to avoid that, since editing each of the records would (I assume) trigger a rewrite, and I want to be able to edit the source text more freely before writing to the table. And then create all the records at once.

Does that make sense? Can someone suggest how to force a collection field to be a looked-up record type, but still leaving it blank? Any other comments are welcome, too. Thanks!

reddit.com
u/Hetvenfour — 14 hours ago

CHAR(10) not working in Dataverse for Teams

If I try make a text label with Text of, for example: "A"&Char(10)&"B" it renders on only one line. Playing around with the wrap, autoheight, and other properties does not fix the issue. Does anyone know why it won't create a line break? Or suggest an alternative? CHAR(13) doesn't work either

This is only in Dataverse for Teams, regular PowerApps does line breaks just fine for me

Thank you

reddit.com
u/Hetvenfour — 16 days ago

A new-to-me perspective on the “our part” idea

TL;DR: “our part” need not only refer to things we do/did wrong in the past.

I really appreciated a share I heard last week from someone whose sobriety I admire.

They were talking about how going over their moral inventory with a sponsor helped them understand the influence that they had over situations. I feel like most shares like that, mine included, tend to focus on identifying our role in negative things - what we did wrong that we can learn to not do in the future. By contrast, this person talked about how that exercise helped them develop a realistic understanding of their power to make positive change, and the confidence that grew over time as they put this into practice.

Of course this isn’t a new idea, just the other side of the same coin that is the 2nd part of the serenity prayer about having the courage to change the things we can. I always appreciate it when a new rendition of an important concept gives me a fresh perspective.

reddit.com
u/Hetvenfour — 1 month ago