I would like to copy the value from a selectable SAIL gridField into a rule inpu

I would like to copy the value from a selectable SAIL gridField into a rule input ri!selectedDoc. Currently the local variable called local!selectedDocumentId holds the selected value of the grid. I tried doing the following: 1) local!selectedDocumentId: ri!selectedDoc
and
2)saveInto: ri!selectedDoc

Both of these methods didn't yield the correct results. Anybody has any ideas?...

OriginalPostID-102453

OriginalPostID-102453

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    As stated in the answer to your previous post the ri! namespace cannot be used as a target for saving a value. You need to have local!selectedDocumentId in the load() section of your expression and then in the with() section you can pass it into a rule:
    load(local!selectedDocumentId,
    with(
    a!gridField(...),
    local!exprResult: rule!myRule(local!selectedDocumentId)
    ))
  • There is no separate rule called myRule....I am using the selectedDocumentId inside of the same rule where I have all the grid functionality being written....and I want to pass the value of selectedDocumentId into a rule input ri!selectedDoc inside the same rule.....later I will pass this rule input into a pv variable which can be used inside a Delete Document smart service to delete that document using its id that was passed from local!selectedDocumentId to ri!selectedDoc to the pv! variable I declared.