U-BAQ BPM Help Needed

,

We are attempting to split the value of UD05.Key5 into two other columns. UD05.Key1 needs to be everything from UD05.Key5 before the “-” and UD05.Key2 needs to be everything after.

Currently, the code is set to only populate UD05.Key1. The errors shown are what I get when I try to designate the columns within the C# code.

If needed I can create variables that hold the value of the keys and then assign them after the C# code runs. But, I would like to know the correct context for targeting these columns within the C# code.

Thanks for any and all help.

You need to get the current row.

I would do something like this:

foreach(var tt in queryResult.Results.Where(r=>r.Updated()))
{
    tt.UD05_Key1 = tt.UD05_Key5.Split('-')[0];
    tt.UD05_Key2 = tt.UD05_Key5.Split('-')[1];
}

Might want to split it into an array and check the count before blindly setting with an index though. That’s bound to hit an Object Ref error at some point, but you get the idea with the syntax.

I also made an assumption you only want to do that with rows that were updated in the UBAQ. If not, and this runs on GetList or something, then remove .Where(r=>r.Updated())

5 Likes