Hi list,<br><br>is there any way to retrieve a record item whose identifier is in a variable? For instance:<br><br>-record(state, {<br> type = 1<br>}).<br><br>These do not work:<br><br>Type = type,<br>Val = #state.Type.<br>
<br>nor<br><br>#state{Type = Val}.<br><br>I have a routine which basically just needs to lookup record items and I'd like to avoid writing 20 time the same code just because Type changes.<br><br>Thank you,<br><br>r.<br>