Azi
11/29/2021, 6:35 PM.asMappedResults
, can I get the type of the record like by N/search
for record loading purposes afterwards?Clay Roper
11/29/2021, 6:44 PMSELECT
id,
tranid,
'myType' AS my_type
FROM transaction
where 'myType' can be either static or determined by logic per your demandsSandii
11/29/2021, 6:44 PMtype
in queries (and searches) are not exactly equal to the record.Type
enum, it's likely going to need a manual mappingClay Roper
11/29/2021, 6:45 PMtype
😄
Edited to fix thatbattk
11/29/2021, 6:57 PMClay Roper
11/29/2021, 7:01 PMbattk
11/29/2021, 7:02 PMbattk
11/29/2021, 7:03 PMClay Roper
11/29/2021, 7:05 PMbattk
11/29/2021, 7:07 PMClay Roper
11/29/2021, 7:08 PMAzi
11/29/2021, 7:12 PMN/search
on item from a map/reduce, I wanted to load the record for each result in the map stage. I was able to get what type of item I was loading (inventory, non-inventory etc...) by using search.type
I know that search and record enums are not necessarily identical, but for that case it did what I needed, differentiating between item types. There is no built in way in query to do that?Azi
11/29/2021, 7:12 PMAzi
11/29/2021, 7:13 PMNon Invntry Part
nothing near the string representation of the enumAzi
11/29/2021, 7:16 PMbattk
11/29/2021, 7:17 PMbattk
11/29/2021, 7:17 PMAzi
11/29/2021, 7:20 PMbattk
11/29/2021, 7:21 PMbattk
11/29/2021, 7:21 PMClay Roper
11/29/2021, 7:30 PMAzi
11/29/2021, 7:31 PMClay Roper
11/29/2021, 7:35 PMClay Roper
11/29/2021, 7:36 PMitemtype
table won't get you there: for example, it maps Assembly to Assembly, which isn't the record.Type enum value of assemblyitem