Skip to main content
Answer

How to use filter parameters on a processing screen as parameters in the processing function

  • July 7, 2025
  • 2 replies
  • 87 views

So i wanna use filter parameters on my processing screen to be used in the processing function without breaking functionality, this is how I’m currently binding the processing function but it can’t take parameters like this:
 

protected virtual void _(Events.RowSelected<XCRecurringTaskFilter> e)
{
if (e.Row == null) return;

RecTasks.SetProcessEnabled(true);
RecTasks.SetProcessAllEnabled(true);
// this is the line
RecTasks.SetProcessWorkflowAction<XCRecurringTaskMaint>(g => g.GenerateTasks);

}

 

Best answer by Abdou2025

@Tony Lanzer Thank you for your response, I found someone asking the same question and one gave him a solution, and I forgot to update this so I’m gonna leave the link for anyone wondering the same thing

2 replies

Tony Lanzer
Pro III
Forum|alt.badge.img+2
  • Pro III
  • July 9, 2025

SetProcessWorkflowAction() is overloaded. You might want to check out the other versions that take a parameter collection as a subsequent parameter.  In your example, it could be something like:

    if (!String.IsNullOrEmpty(e.Row?.Action))
{
var parameters = Filter.Cache.ToDictionary(e.Row);
RecTasks.SetProcessWorkflowAction(e.Row.Action, parameters);
}

And on your filter class, you can define Action as a field:

    [PXWorkflowMassProcessing(DisplayName = "Action")]
public virtual string Action { get; set; }
public abstract class action : PX.Data.BQL.BqlString.Field<action> { }

Does this help?


  • Author
  • Freshman II
  • Answer
  • July 9, 2025

@Tony Lanzer Thank you for your response, I found someone asking the same question and one gave him a solution, and I forgot to update this so I’m gonna leave the link for anyone wondering the same thing