Aug 31st, 2011, 7:08 AM
Hi tinfire,
Welcome to the forums!
haha, I never cease to be surprised at the ways in which this script is being used. What you described makes total sense, it's just that it wasn't expressly designed for it. But okay, let's try and figure it out.
So yes, the Client Map functionality is usually what you'll need to look at. Ordinarily, people use that in conjunction with an External form, then just include a hidden field containing a value that can be mapped to each client account when they log in, so each client sees different data depending on what info is in their account. This is cool because configuration is minimized: you need a single View, that's all.
But this obviously won't work in your case. So here's an alternative.
The Views now allow you to define default values for the submission field values. What you could do is create a new field in your form called "hidden_origin" or something like that. Create 2 Views, each defining a different value for that field: say, for client 1 have that field load up with "client1" and with client 2 have "client2". Don't bother adding that new field to a View - we don't want it to ever be editable - just initially set when the submission is first created.
So far so good: at this point, each submission will have one of those two values stored in the hidden_origin field depending on which View they were created with.
Next, map each View to a client so they can only see one or the other View.
Finally, create a Standard Filter to each View that limits the results to only show values with hidden_origin = "client1" or hidden_origin = "client2".
After all this is done, when each client logs in they'll see the same form but a different set of submissions. Anything one client creates will never be visible by the other.
Clear as mud?
- Ben
Welcome to the forums!
haha, I never cease to be surprised at the ways in which this script is being used. What you described makes total sense, it's just that it wasn't expressly designed for it. But okay, let's try and figure it out.
Quote:I have made an internal form with a couple of users (clients) and want to filter the submissions - each user edits its own.... How can I set client's account data (username, etc.) as table fields?
So yes, the Client Map functionality is usually what you'll need to look at. Ordinarily, people use that in conjunction with an External form, then just include a hidden field containing a value that can be mapped to each client account when they log in, so each client sees different data depending on what info is in their account. This is cool because configuration is minimized: you need a single View, that's all.
But this obviously won't work in your case. So here's an alternative.
The Views now allow you to define default values for the submission field values. What you could do is create a new field in your form called "hidden_origin" or something like that. Create 2 Views, each defining a different value for that field: say, for client 1 have that field load up with "client1" and with client 2 have "client2". Don't bother adding that new field to a View - we don't want it to ever be editable - just initially set when the submission is first created.
So far so good: at this point, each submission will have one of those two values stored in the hidden_origin field depending on which View they were created with.
Next, map each View to a client so they can only see one or the other View.
Finally, create a Standard Filter to each View that limits the results to only show values with hidden_origin = "client1" or hidden_origin = "client2".
After all this is done, when each client logs in they'll see the same form but a different set of submissions. Anything one client creates will never be visible by the other.
Clear as mud?
- Ben