Skip to main content

Choose a page or pageref based on conditions

Comments

3 comments

  • bartman

    There is this PageRef DataAccessPlugin, maybe this can be used? Is there docu available?

    0
  • Michael Bergmann

    Hi Heiko,

    such a filter is not possible in an FS_REFERENCE. A ValueService might be an option here (of course this would just check after choosing). But that might be useful nevertheless, depends a little on the concrete situation in my opinion:

    • If it is more like "I basically do know which PageRef I want, I just need some kind of safety net that checks whether the target fulfills all preconditions" => fine IMHO
    • But if it is like "I have a bunch of PageRefs that meet those conditions and want to choose among those" => not so much...

    Concerning the ValueService approach, just a remark/hint: A value service is only evaluated in the UI - so in a case that pageref becomes "invalid" later as a target (e.g. because that field has been emptied later), this will not be recognized as validation error upon generation - only when you open the form again later. So there should be s separate check later.

    I'm myself not really familiar with the PageRefDataAccessPlugin - but at least from what the documentation says, it is more for remote project setups (and - if I remember correctly - was at least initially created for the use within a "FragmentCreator" project approach - which is deprecated/removed meanwhile). And that DAP does not allow such kind of filter anyway from what I see. 

    In general, an own DAP implementation might also be a possible approach - but would be more effort. 

    Hope this helps :-) 
    Michael

    0
  • bartman

    Hi Michael,

    yes helps perfectly, thanks a lot for the detailed explanation. We will use the ValueService approach and also perform the condition check during generation by calling the logic via script (Executable).

     

    0

Please sign in to leave a comment.