Membership Plugin - Populate CreatedByUserNum from drop down.

By Rusty - January 14, 2011 - edited: January 14, 2011

the Frvilious Details...
I have a Section Editor section called Customer but labeled Order Status. The admin can create an order, and then via a drop down single select, choose the client for whom the Order Status record will be associated with.

Since the admin is creating the order, the CreatedByUserNum populates from the Admins num, however the issue is that the client, will have Author status, so they can append/make changes to their order notes etc. and as such, since they didn't author the Order Status, they can't view it.

How can I get CMS Builder to populate the "CreatedByUserNum" from the "Client" drop down. This way, the table records it as being created/authored by that user, and when the client logs in they can view the records.

I need CMS Builder to let a user have access to on this criteria.

If CreatedByUserNum = $CURRENT_USER['num'] OR if CreatedByUserNum = 1 (admin) AND Client = CurrentUserNum.

The other option/possibility would be to Assign the $RECORD[client] value to the CreatedByUserNum.

I'm sure there's a way to do it. I can see in the CMS Builder Drop down Field Type selection I can pick "Related Records"
If I pick that Option I could just set the value by doing this: "CreatedByUserNum = $RECORD[client]

But when I try to save it, the popup msg says the "Type must be set to None"


Please Help Me!
================
2 hours of messing around later...

I have discovered a round-about way of sort of fixing it. By clicking on the "change" text link next to the "Created By" user, we can change who "Created" that record. It's more or less doing the exact same thing I want to do, but I want to populate that change automatically from a drop down when the Client is selected.

Still open for any thoughts on how we can do this automatically.
Rusty