Access index id in scripted field

solved in What is the ID in documents or surrounding documents links?