Forum Discussion
AlexCertificati
7 years agoQrew Cadet
My question is - how might I efficiently change these multiple choice text fields to be linked to a specific user without deleting said person fields
I don't really understand exactly what you're asking, you want to have a QB user named Field Tech? But it seems clear that part of your solution is a helper field that uses ToUser() function https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=178&rl=jk
Is a double relationship recommended for this?
This is called a "many to many relationship". The foundational idea is that the 'relationship' is a third table - call it Actual Requests, let's say. So say you have PersonA, PersonB and PersonC and you have WR1, WR2 and WR3. If PersonA is assigned to WR2, you create a new Actual Request with those characteristics, and Actual Requests is a child to both parent tables.
There's TONS of education out there on this. You shouldn't have much trouble finding "Many to Many" tutorials that make this seem a lot more intuitive than it sounds like here.
- JordanMcAlister7 years agoQrew CaptainSo, for example, I have the users:
John Doe1
John Doe2
John Doe3
My "Reviewer" field(and this is the same format for my other person fields) has the current multiple-choice text options:
J. Doe1
J. Doe2
J. Doe3
I need to either efficiently change the J. Doe# to -> John Doe# (User) or somehow let quickbase know that the text J. Doe1 is the user John Doe1. - AlexCertificati7 years agoQrew CadetRight. Gotcha. If the "J. Doe1" multiple choice choices are sufficiently restricted, this is pretty easy. Add a field to that table for each field you need to change.
So, you have a [Reviewer] field with values like "J. Doe1", create [Reviewer (User)]. Make it a Formula - User field type. Write a long IF or CASE formula** to map your bad data onto good data, such as:Case([Reviewer],
Where the first value in each pair is the exact multiple choice text string and the second value is the exact user name you want to change it to.
"J. Doe1","John Doe1",
"J. Doe2","John Doe2",
etc)
And then anywhere that you need QB to operate on this value as a user value, have it use the [Reviewer (User)] field instead of [Reviewer] .
** Or create a lookup table to map these values (this is probably your preferred approach if you have a lot of these paired fields to which the same mapping should be applied, or if you're going to continue to use [Reviewer] as your data-entry field going forward). Or, if the multiple choices were created with a single consistent pattern, this could be single line of formula if you're lucky. - JordanMcAlister7 years agoQrew CaptainThanks, I'll give this a go!
- JordanMcAlister7 years agoQrew CaptainThe Case function with the formula - User field worked great! I'll probably make a new post regarding the many to many relationship that I need at a later date. For now, the User field accomplishes what I need which was simply to send a notification to the viewer but I'll eventually set it up where my employees table is linked to my Work Requests table.
- AlexCertificati7 years agoQrew CadetThumbs up.
Many to many feels daunting at first but once you grok it you'll wonder that you ever saw things differently.