Hello,
I have a table group with a “plcid” value coming from the BatchPhases query. I am trying to reference this plcid to change the row version of the Header and Details portions in my table group. plcid can be an int 1-10. I have setup row versions 1-10 as well.
I have tried the following keychain expressions to no luck
Query
select phasenumber, phasename, starttime as "start", endtime as "end", CONCAT('phase',phasenumber) as plcid from dbo.BatchPhases where steplogid = ?
Expression:
plcid=="phase1"?"phase1":"Standard"
Query:
select phasenumber, phasename, starttime as "start", endtime as "end", phasenumber as plcid from dbo.BatchPhases where steplogid = ?
Expression:
BatchPhases.plcid==1?1:Standard
I have tried the above with various strings and "@" notation as well.
Below are images to provide some context. Any help is appreciated.
Solved. I used a long keychain expression for each row version, then did NOT uise a dynamic data key. I used the keychain expression as a static key for each row version.
plcid==1?1:plcid==2?2:plcid==3?3:plcid==4?4:plcid==5?5:plcid==6?6:plcid==7?7:plcid==8?8:plcid==9?9:plcid==10?10:Standard
I would move this logic to either the query or add it to the result dataset afterwards with a scripting source.
select if(plcid between 1 and 10, plcid, "Standard") as row_version
If you can't add it to the query for some reason, loop over the query results and add the column. It would be easier to find, edit, debug, etc. than that long key chain.
2 Likes
I think what you wanted to do is just plcid as the "Version Key" property.
Then add each value to your table as a custom version key.
1 Like
This most likely would have worked as well. The real issue is that I was using "dynamic data key" instead of "static data key". Once static was used, things went a lot smoother. Thanks for the reccomendations
3 Likes