Embedded List Control

mmcbride1007
Tera Contributor

I am trying to set up an embedded list and use the "Omit Insert Row Condition" property. I have tried but cannot figure out what kind of condition I need to set up so that it will work properly. What I am trying to do is whenever the state on our Story form is Closed Complete or Closed Incomplete, I do not want the Insert Row to be available. I have tried calling a function that returns a value of true when those conditions are met, setting the variable "answer" to true, and even simply typing 'return = true;' with no success. I cannot find any documentation for this on the Wiki or the forums either... Hoping someone here has done this and can help!!

Thanks,
Mike

1 ACCEPTED SOLUTION

martijn3
Mega Contributor

Finally got it to work:

I managed to do everything using ACLs:
1) create: create a script or add roles. do NOT use reference fields at this time, because they will not be populated if there is no embedded record yet
2) write: this is the rule that determines who can write OR CREATE a record. If people have create roles but no write, then they cannot write to the "new" record, hence they cannot actually save the new record and no new record will be created. This means that the create may be less restrictive than the write rule.
3) delete: (optional) if you want users to be able to delete, set this ACL.
4) list_edit: don't forget to set this one, especially if you have removed these rights to prevent little accidents.


View solution in original post

14 REPLIES 14

brumiou
Mega Guru

I'm also trying that, but I can't figure out what to do...

Is there any way to put an embedded list read-only?

thx

rgds

Xavier


martijn3
Mega Contributor

Several things to consider here:
* Make sure you set the ACL's straight. No matter what access you grant here, if the user has not create access for the table in the related list, he will not have it even with an answer=false;
* Be aware that "Omit" means "Leave out". This means that you need to set the answer to false to allow the user to add a new record.

Nonetheless: this feature doesn't seem to work at all.
As long as I allow people in the ACL, the new row will always show; even if I select "New roles" = admin.
Since ACL's don't know where you are coming from, this is a serious issue. Maybe it is safer to use Related Lists instead of Embedded Lists.


martijn3
Mega Contributor

Toyed a bit further:
Forget the "omit new". I think you can do everything with ACLs:
Even though there is no new record yet, you will have certain values populated in the embedded list, such as the reference to the parent record. This way I think you can do almost everything using the ACL for create.


martijn3
Mega Contributor

And yet further:
Somehow the references that I talked about in my previous post only seem to be available if there is at least one record in the embedded list. Otherwise these references are empty.
Will contact SNC on the exact operation of this one. Maybe I will have to move top related lists; There it should work.